Merge branch 'dev'
This commit is contained in:
commit
3268da02d5
25 changed files with 72 additions and 33 deletions
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB |
1
app/assets/images/marianne.svg
Normal file
1
app/assets/images/marianne.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
|
@ -1,7 +1,9 @@
|
|||
@import "colors";
|
||||
@import "constants";
|
||||
|
||||
.demande {
|
||||
padding-bottom: $default-padding;
|
||||
padding-top: 3 * $default-padding;
|
||||
padding-bottom: 3 * $default-padding;
|
||||
|
||||
h1 {
|
||||
margin-bottom: $default-padding;
|
||||
|
@ -14,4 +16,12 @@
|
|||
b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background-color: $grey;
|
||||
margin-top: 2 * $default-padding;
|
||||
margin-bottom: 2 * $default-padding;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,26 @@ class Admin::AttestationTemplatesController < AdminController
|
|||
render 'admin/attestation_templates/show', formats: [:pdf]
|
||||
end
|
||||
|
||||
def delete_logo
|
||||
attestation_template = @procedure.attestation_template
|
||||
|
||||
attestation_template.remove_logo!
|
||||
attestation_template.save
|
||||
|
||||
flash.notice = 'le logo a bien été supprimée'
|
||||
redirect_to edit_admin_procedure_attestation_template_path(@procedure)
|
||||
end
|
||||
|
||||
def delete_signature
|
||||
attestation_template = @procedure.attestation_template
|
||||
|
||||
attestation_template.remove_signature!
|
||||
attestation_template.save
|
||||
|
||||
flash.notice = 'la signature a bien été supprimée'
|
||||
redirect_to edit_admin_procedure_attestation_template_path(@procedure)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def activated_attestation_params
|
||||
|
|
|
@ -228,6 +228,15 @@ class Admin::ProceduresController < AdminController
|
|||
redirect_to edit_admin_procedure_path(procedure)
|
||||
end
|
||||
|
||||
def delete_notice
|
||||
procedure = Procedure.find(params[:id])
|
||||
|
||||
procedure.notice.purge_later
|
||||
|
||||
flash.notice = 'la notice a bien été supprimée'
|
||||
redirect_to edit_admin_procedure_path(procedure)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def cloned_from_library?
|
||||
|
|
|
@ -13,7 +13,7 @@ class ProcedureDecorator < Draper::Decorator
|
|||
|
||||
def logo_img
|
||||
if logo.blank?
|
||||
h.image_url(LOGO_NAME)
|
||||
h.image_url("marianne.svg")
|
||||
else
|
||||
if Flipflop.remote_storage?
|
||||
(RemoteDownloader.new logo.filename).url
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
= image_tag @attestation_template.logo.url, class: 'thumbnail'
|
||||
.form-group
|
||||
= f.label :logo, "Logo de l'attestation"
|
||||
- if @attestation_template.logo.present?
|
||||
= link_to 'Supprimer le logo', admin_procedure_attestation_template_logo_path(@procedure), method: :delete
|
||||
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg'
|
||||
%p.help-block
|
||||
Fichier accepté : JPG / JPEG / PNG
|
||||
|
@ -52,6 +54,8 @@
|
|||
= image_tag @attestation_template.signature.url, class: 'thumbnail'
|
||||
.form-group
|
||||
= f.label :signature, "Tampon de l'attestation"
|
||||
- if @attestation_template.signature.present?
|
||||
= link_to 'Supprimer le tampon', admin_procedure_attestation_template_signature_path(@procedure), method: :delete
|
||||
= f.file_field :signature, accept: 'image/png, image/jpg, image/jpeg'
|
||||
%p.help-block
|
||||
Fichier accepté : JPG / JPEG / PNG
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
= f.label :duree_conservation_dossiers_dans_ds, "Sur demarches-simplifiees.fr* (durée en mois après le début de l’instruction)"
|
||||
= f.number_field :duree_conservation_dossiers_dans_ds, class: 'form-control', placeholder: '6', required: true
|
||||
|
||||
= f.label :duree_conservation_dossiers_hors_ds, "Hors demarches-simplifiees.fr* (durée en mois)"
|
||||
= f.label :duree_conservation_dossiers_hors_ds, "Hors demarches-simplifiees.fr* (durée en mois après la fin de l'instruction)"
|
||||
= f.number_field :duree_conservation_dossiers_hors_ds, class: 'form-control', placeholder: '6', required: true
|
||||
|
||||
.form-group
|
||||
|
@ -60,6 +60,9 @@
|
|||
- else
|
||||
%a{ href: url_for(notice), target: '_blank' }
|
||||
= notice.filename.to_s
|
||||
\-
|
||||
= link_to 'supprimer', delete_notice_admin_procedure_path(@procedure),
|
||||
method: :delete
|
||||
%br
|
||||
Modifier :
|
||||
= f.file_field :notice,
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#form-login
|
||||
%br
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#login_admin
|
||||
= t('dynamics.admin.connexion_title')
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
- content_for(:title, 'Demande de compte administrateur')
|
||||
|
||||
- content_for :footer do
|
||||
= render partial: "root/footer"
|
||||
|
||||
.container.demande
|
||||
%h1 Demande de compte administrateur
|
||||
|
||||
|
@ -5,6 +10,8 @@
|
|||
%p.intro Pour obtenir un compte administrateur sur demarches-simplifiees.fr, veuillez remplir le formulaire ci-dessous et un membre de notre équipe vous contactera dès que possible.
|
||||
%p.intro Tous les champs sont obligatoires.
|
||||
|
||||
%hr
|
||||
|
||||
= form_tag({ controller: 'demandes', action: 'create' }, class: 'form') do
|
||||
|
||||
= label_tag :organization_name do
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
= devise_error_messages!
|
||||
|
||||
#form-login
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#gestionnaire_login Changement de mot de passe
|
||||
|
||||
%br
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
%br
|
||||
#form-login
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#gestionnaire_login Mot de passe oublié
|
||||
|
||||
%br
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#form-login
|
||||
%br
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#gestionnaire_login Instructeur
|
||||
|
||||
%br
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
%a#title-navbar{ href: root_path }
|
||||
.row#home
|
||||
.col-lg-6.no-padding
|
||||
= image_tag('marianne_small.png', class: 'logo')
|
||||
= image_tag('marianne.svg', class: 'logo')
|
||||
.col-lg-6.no-padding#tps-title
|
||||
demarches-simplifiees.fr
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
= devise_error_messages!
|
||||
|
||||
#form-login
|
||||
.flag
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#gestionnaire_login Changement de mot de passe
|
||||
|
||||
%br
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
%br
|
||||
#form-login
|
||||
.flag
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#gestionnaire_login Mot de passe oublié
|
||||
|
||||
%br
|
||||
|
|
|
@ -14,7 +14,3 @@
|
|||
= @dossier.procedure.libelle
|
||||
%p.procedure-description
|
||||
= h string_to_html(@dossier.procedure.description)
|
||||
|
||||
- else
|
||||
#logo_procedure.flag
|
||||
= image_tag(image_url(LOGO_NAME), { id: 'logo_tps' })
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
%p.lead#pro_section
|
||||
.flag
|
||||
= image_tag(image_url(LOGO_NAME))
|
||||
%br
|
||||
%h2#titre-procedure.text-info
|
||||
= @procedure.libelle
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
LOGO_NAME = 'logos/logo-ds.png'
|
|
@ -113,6 +113,11 @@ fr:
|
|||
format:
|
||||
delimiter: ''
|
||||
activerecord:
|
||||
attributes:
|
||||
user:
|
||||
password: 'Le mot de passe'
|
||||
gestionnaire:
|
||||
password: 'Le mot de passe'
|
||||
errors:
|
||||
messages:
|
||||
blank: "doit être rempli"
|
||||
|
@ -138,7 +143,7 @@ fr:
|
|||
invalid: invalide
|
||||
taken: déjà utilisé
|
||||
password:
|
||||
too_short: ': Le mot de passe est trop court'
|
||||
too_short: 'est trop court'
|
||||
password_confirmation:
|
||||
confirmation: ': Les deux mots de passe ne correspondent pas'
|
||||
invite:
|
||||
|
@ -151,7 +156,7 @@ fr:
|
|||
invalid: invalide
|
||||
taken: déjà utilisé
|
||||
password:
|
||||
too_short: ': Le mot de passe est trop court'
|
||||
too_short: 'est trop court'
|
||||
|
||||
errors:
|
||||
messages:
|
||||
|
|
|
@ -194,6 +194,7 @@ Rails.application.routes.draw do
|
|||
member do
|
||||
post :hide
|
||||
delete :delete_deliberation
|
||||
delete :delete_notice
|
||||
end
|
||||
|
||||
resources :types_de_champ, only: [:destroy]
|
||||
|
@ -231,6 +232,9 @@ Rails.application.routes.draw do
|
|||
|
||||
post 'attestation_template/preview' => 'attestation_templates#preview'
|
||||
patch 'attestation_template/preview' => 'attestation_templates#preview'
|
||||
|
||||
delete 'attestation_template/logo' => 'attestation_templates#delete_logo'
|
||||
delete 'attestation_template/signature' => 'attestation_templates#delete_signature'
|
||||
end
|
||||
|
||||
namespace :instructeurs do
|
||||
|
|
|
@ -27,6 +27,6 @@ namespace :dev do
|
|||
end
|
||||
|
||||
task :console do
|
||||
exec("ssh tps@sgmap_production1 -t 'source /etc/profile && cd current && bundle exec rails c production'")
|
||||
exec("ssh tps@sgmap_production1 -t 'source /etc/profile && cd current && bundle exec rails c -e production'")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -276,7 +276,7 @@ describe NewGestionnaire::AvisController, type: :controller do
|
|||
|
||||
it { expect(created_gestionnaire).to be_nil }
|
||||
it { is_expected.to redirect_to sign_up_gestionnaire_avis_path(avis_id, invited_email) }
|
||||
it { expect(flash.alert).to eq(['Password doit être rempli']) }
|
||||
it { expect(flash.alert).to eq(['Le mot de passe doit être rempli']) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ describe ProcedureDecorator do
|
|||
|
||||
describe 'logo_img' do
|
||||
subject { super().logo_img }
|
||||
it { is_expected.to match(/http.*#{ActionController::Base.helpers.image_url(LOGO_NAME)}/) }
|
||||
it { is_expected.to match(/http.*#{ActionController::Base.helpers.image_url("marianne.svg")}/) }
|
||||
end
|
||||
|
||||
describe 'geographic_information' do
|
||||
|
|
Loading…
Reference in a new issue