diff --git a/assets/styles/main.css b/assets/styles/main.css index 968a283..f6f68b0 100644 --- a/assets/styles/main.css +++ b/assets/styles/main.css @@ -208,6 +208,7 @@ fieldset { position: relative; bottom: -.55em; + margin-bottom: .5rem; } & + button.form-new-item { @@ -224,10 +225,19 @@ textarea { } .form-input { - display: flex; - flex-direction: column; + display: grid; + grid-auto-flow: column; + grid-template-rows: auto auto; + grid-auto-columns: 1fr; + column-gap: 1rem; margin-top: 1rem; + & > div { + width: 100%; + display: flex; + flex-direction: column; + } + label { margin-bottom: .5rem; } @@ -257,8 +267,9 @@ textarea { .help { margin: 0; - margin-bottom: .15rem; + margin-top: .15rem; font-style: oblique; + font-size: .9rem; } input, @@ -268,24 +279,6 @@ textarea { } } -.form-row { - display: flex; - width: 100%; - gap: 1rem; - flex-wrap: wrap; - margin-top: 1rem; - align-items: end; - - .form-input { - margin-top: 0; - flex: 1; - } - - .form-input.width-2 { - flex-grow: 2; - } -} - .form-action { margin-top: 1rem; } diff --git a/locales/en/main.ftl b/locales/en/main.ftl index fd78094..87af3fd 100644 --- a/locales/en/main.ftl +++ b/locales/en/main.ftl @@ -44,8 +44,8 @@ record-input-name = button-create-record-next-step = Next step record-input-ttl = - .input-label = Duration in cache (TTL), in seconds - .help = Optional, default to 1 hour (3600 secondes) + .input-label = Duration in cache (TTL) + .help = In seconds, optional, default to 1 hour .error-input-type_error = The duration in cache must be a positif integer number. .error-record-parse-number = The duration in cache must be a positif integer number. @@ -66,10 +66,12 @@ record-input-mailservers = button-add-mailserver = Add an other mailserver record-input-spf = - .input-label = Sender policy (SPF) + .legend = Sender policy (SPF) + .input-label = Sender policy record-input-dmarc = - .input-label = Error reporting policy (DMARC) + .legend = Error reporting policy (DMARC) + .input-label = Error reporting policy record-input-dkim = .legend = Cryptographic signature key (DKIM) #{ $index } diff --git a/locales/fr/main.ftl b/locales/fr/main.ftl index 2cb7887..fb6397e 100644 --- a/locales/fr/main.ftl +++ b/locales/fr/main.ftl @@ -44,8 +44,8 @@ record-input-name = button-create-record-next-step = Étape suivante record-input-ttl = - .input-label = Durée dans le cache (TTL), en seconde - .help = Optionnel, 1 heure par défaut (3600 secondes) + .input-label = Durée dans le cache (TTL) + .help = En secondes, optionnel, 1 heure par défaut .error-input-type_error = La durée dans le cache doit être un nombre entier positif. .error-record-parse-number = La durée dans le cache doit être un nombre entier positif. @@ -66,13 +66,15 @@ record-input-mailservers = button-add-mailserver = Ajouter un autre serveur de courriel record-input-spf = - .input-label = Politique d’envoi (SPF) + .input-label = Politique d’envoi + .legend = Politique d’envoi (SPF) record-input-dmarc = - .input-label = Politique de signalement d’erreurs (DMARC) + .legend = Politique de signalement d’erreurs (DMARC) + .input-label = Politique de signalement d’erreurs record-input-dkim = - .legend = Clé de signature cryptographique (DKIM) #{ $index } + .legend = Clé de signature cryptographique #{ $index } .input-label-selector = Sélecteur .input-label-signing-key = Clé de signature @@ -88,6 +90,6 @@ record-config-mail-heading = Configurer le courriel pour le domaine { $n record-config-section-mail = .servers = Serveurs de courriel .security = Sécurité - .dkim = Signature cryptographique + .dkim = Signature cryptographique (DKIM) button-save-configuration = Sauvegarder la configuration diff --git a/templates/pages/new_record.html b/templates/pages/new_record.html index 643bc95..d161e2c 100644 --- a/templates/pages/new_record.html +++ b/templates/pages/new_record.html @@ -5,7 +5,7 @@ {% block main %}

{{ tr(msg="record-creation-process-heading", zone=current_zone, lang=lang) }}

- +{{ errors | json_encode(pretty=true) }} {% set domain_error = errors | get(key="/name", default="") %} diff --git a/templates/pages/new_record/configure_record.html b/templates/pages/new_record/configure_record.html index 43754cd..39cdd0e 100644 --- a/templates/pages/new_record/configure_record.html +++ b/templates/pages/new_record/configure_record.html @@ -12,25 +12,27 @@ -

- {{ tr(msg="record-input-ttl", attr="help", lang=lang) }} -

- - {% if ttl_error %} -

- {{ tr( - msg="record-input-ttl", - attr="error-" ~ ttl_error.code | replace(from=":", to="-"), - lang=lang) }} +

+ + {% if ttl_error %} +

+ {{ tr( + msg="record-input-ttl", + attr="error-" ~ ttl_error.code | replace(from=":", to="-"), + lang=lang) }} +

+ {% endif %} +

+ {{ tr(msg="record-input-ttl", attr="help", lang=lang) }}

- {% endif %} +
{% set global_address_error = errors | get(key="/addresses/data", default="") %} @@ -45,32 +47,34 @@ > {{ tr(msg="record-input-addresses", attr="input-label", index=loop.index, lang=lang) }} - - {% if global_address_error or address_error %} -

- {% if global_address_error %} - {{ tr( - msg="record-input-addresses", - attr="error-" ~ global_address_error.code | replace(from=":", to="-"), - lang=lang) }} - {% else %} - {{ tr( - msg="record-input-addresses", - attr="error-" ~ address_error.code | replace(from=":", to="-"), - lang=lang) }} - {% endif %} -

- {% endif %} +
+ + {% if global_address_error or address_error %} +

+ {% if global_address_error %} + {{ tr( + msg="record-input-addresses", + attr="error-" ~ global_address_error.code | replace(from=":", to="-"), + lang=lang) }} + {% else %} + {{ tr( + msg="record-input-addresses", + attr="error-" ~ address_error.code | replace(from=":", to="-"), + lang=lang) }} + {% endif %} +

+ {% endif %} +