From ea2a73cdc1608ff86e6d97629fdf9616b5c78b83 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 26 Mar 2019 17:20:10 +0100 Subject: [PATCH] add asterisks on required fields --- app/assets/stylesheets/application.scss.erb | 1 + app/assets/stylesheets/modules/signup.scss | 31 +++++++++++++ .../templates/shared/signupModal.html.erb | 45 +++++++++++++------ config/locales/app.public.en.yml | 1 + config/locales/app.public.es.yml | 1 + config/locales/app.public.fr.yml | 1 + config/locales/app.public.pt.yml | 9 ++-- 7 files changed, 72 insertions(+), 17 deletions(-) create mode 100644 app/assets/stylesheets/modules/signup.scss diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index 965ec8d21..f8320961f 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -33,6 +33,7 @@ @import "app.components"; @import "app.plugins"; @import "modules/invoice"; +@import "modules/signup"; @import "app.responsive"; diff --git a/app/assets/stylesheets/modules/signup.scss b/app/assets/stylesheets/modules/signup.scss new file mode 100644 index 000000000..986bb11e4 --- /dev/null +++ b/app/assets/stylesheets/modules/signup.scss @@ -0,0 +1,31 @@ +.signup-form { + .names-row { + input.form-control { + width: 89%; + display: inline-block; + } + } + .required-row { + div.input-group { + width: 95%; + display: inline-table; + } + select.form-control { + width: 95%; + display: inline-block; + } + .exponent { + position: relative; + top: -14px; + right: -4px; + } + .exponent-select { + top: -1px; + } + } + .info-required { + color: #5a5a5a; + font-size: 8pt; + font-style: italic; + } +} diff --git a/app/assets/templates/shared/signupModal.html.erb b/app/assets/templates/shared/signupModal.html.erb index 778a50c72..ba356e4ca 100644 --- a/app/assets/templates/shared/signupModal.html.erb +++ b/app/assets/templates/shared/signupModal.html.erb @@ -6,7 +6,7 @@ {{alert.msg}}
-
+
+ {{ 'gender_is_required'}}
-
+
+ {{ 'first_name_is_required' }}
@@ -45,11 +47,12 @@ class="form-control" placeholder="{{ 'your_surname' | translate }}" required> + {{ 'surname_is_required' }}
-
+
@@ -60,11 +63,12 @@ placeholder="{{ 'your_pseudonym' | translate }}" required>
+ {{ 'pseudonym_is_required' }}
-
+
@@ -75,11 +79,12 @@ placeholder="{{ 'your_email_address' | translate }}" required>
+ {{ 'email_is_required' }}
-
+
@@ -91,12 +96,13 @@ required ng-minlength="8">
+ {{ 'password_is_required' }} {{ 'password_is_too_short_(minimum_8_characters)' }}
-
+
@@ -108,6 +114,7 @@ required ng-minlength="8" match="user.password">
+ {{ 'password_confirmation_is_required' }} {{ 'password_does_not_match_with_confirmation' }}
@@ -124,7 +131,7 @@
-
+
@@ -135,11 +142,12 @@ placeholder="{{ 'name_of_your_organization' | translate }}" ng-required="user.organization">
+ {{ 'organization_name_is_required' }}
-
+
@@ -150,22 +158,24 @@ placeholder="{{ 'address_of_your_organization' | translate }}" ng-required="user.organization">
+ {{ 'organization_address_is_required' }}
-
+
+
{{ 'user_s_profile_is_required' }}
-
+
@@ -180,11 +190,12 @@ ng-click="openDatePicker($event)" required/>
+ {{ 'birth_date_is_required' }}
-
+
@@ -195,6 +206,7 @@ placeholder="{{ 'phone_number' | translate }}" required>
+ {{ 'phone_number_is_required' }}
@@ -229,9 +241,16 @@ ng-model="user.cgu" value="true" ng-required="cgu != null"/> - +
+ + + {{ 'field_required' }} +
@@ -240,4 +259,4 @@
\ No newline at end of file +
diff --git a/config/locales/app.public.en.yml b/config/locales/app.public.en.yml index e98725291..1bc55811c 100644 --- a/config/locales/app.public.en.yml +++ b/config/locales/app.public.en.yml @@ -85,6 +85,7 @@ en: i_accept_to_receive_information_from_the_fablab: "I accept to receive information from the FabLab" i_ve_read_and_i_accept_: "I've read and I accept" _the_fablab_policy: "the FabLab policy" + field_required: "Field required" # password modification modal change_your_password: "Change your password" diff --git a/config/locales/app.public.es.yml b/config/locales/app.public.es.yml index 96f486005..9961e7661 100644 --- a/config/locales/app.public.es.yml +++ b/config/locales/app.public.es.yml @@ -84,6 +84,7 @@ es: i_accept_to_receive_information_from_the_fablab: "Acepto recibir información del FabLab" i_ve_read_and_i_accept_: "He leido y acepto" _the_fablab_policy: "la política de FabLab" + field_required: "Field required" #translation_missing # password modification modal change_your_password: "Cambiar contraseña" diff --git a/config/locales/app.public.fr.yml b/config/locales/app.public.fr.yml index 808cb88d4..d536fbbd2 100644 --- a/config/locales/app.public.fr.yml +++ b/config/locales/app.public.fr.yml @@ -85,6 +85,7 @@ fr: i_accept_to_receive_information_from_the_fablab: "J'accepte de recevoir des informations du Fab Lab" i_ve_read_and_i_accept_: "J'ai lu et j'accepte" _the_fablab_policy: "la charte d'utilisation du Fab Lab" + field_required: "Champ requis" # fenêtre de changement de mot de passe change_your_password: "Modifier votre mot de passe" diff --git a/config/locales/app.public.pt.yml b/config/locales/app.public.pt.yml index 9dc08f8cd..449081aea 100755 --- a/config/locales/app.public.pt.yml +++ b/config/locales/app.public.pt.yml @@ -48,7 +48,7 @@ pt: manage_the_spaces: "Gerenciar espaços" manage_the_projects_elements: "Gerenciar Elementos de Projeto" statistics: "Estatísticas" - customization: "Customizações" + customization: "Customizações" open_api_clients: "OpenAPI clients" # account creation modal @@ -85,6 +85,7 @@ pt: i_accept_to_receive_information_from_the_fablab: "Eu aceito receber informações do FabLab" i_ve_read_and_i_accept_: "Eu li e aceito" _the_fablab_policy: "a política do FabLab" + field_required: "Field required" #translation_missing # password modification modal change_your_password: "Mudar sua senha" @@ -181,8 +182,8 @@ pt: add_a_machine: "Adicionar uma máquina" book: "Reservar" _or_the_: " ou o " - status_enabled: "Ativo" - status_disabled: "Desabilitado" + status_enabled: "Ativo" + status_disabled: "Desabilitado" status_all: "Todos" machines_show: @@ -282,7 +283,7 @@ pt: add_a_space: "Adicionar espaço" status_enabled: "Ativo" status_disabled: "Desabilitado" - status_all: "Todos" + status_all: "Todos" book: "Reservar" space_show: