patron: make the labels more readable

This commit is contained in:
Pierre de La Morinerie 2019-10-23 10:07:21 +00:00
parent 0b9650db78
commit 8f4ead96b0
2 changed files with 6 additions and 4 deletions

View file

@ -17,15 +17,15 @@ class RootController < ApplicationController
end
def patron
description = 'aller voir le super site : https://demarches-simplifiees.fr'
description = 'Aller voir le super site : https://demarches-simplifiees.fr'
all_champs = TypeDeChamp.type_champs
.map { |name, _| TypeDeChamp.new(type_champ: name, private: false, libelle: name, description: description, mandatory: true) }
.map { |name, _| TypeDeChamp.new(type_champ: name, private: false, libelle: name.humanize, description: description, mandatory: true) }
.map.with_index { |type_de_champ, i| type_de_champ.champ.build(id: i) }
all_champs
.filter { |champ| champ.type_champ == TypeDeChamp.type_champs.fetch(:header_section) }
.each { |champ| champ.type_de_champ.libelle = 'un super titre de section' }
.each { |champ| champ.type_de_champ.libelle = 'Un super titre de section' }
all_champs
.filter { |champ| [TypeDeChamp.type_champs.fetch(:drop_down_list), TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)].include?(champ.type_champ) }

View file

@ -1,6 +1,6 @@
.patron
.container
%h1 Icones
%h1 Icônes
%span.icon.follow
%span.icon.unfollow
@ -47,7 +47,9 @@
= render partial: "shared/dossiers/editable_champs/editable_champ",
locals: { champ: champ, form: champ_form, seen_at: nil }
%label Mot de passe
%input{ type: "password", value: "12345678" }
.send-wrapper
= f.submit 'Enregistrer un brouillon (formnovalidate)', formnovalidate: true, class: 'button send'
= f.submit 'Envoyer', class: 'button send primary'