]> git.agnieray.net Git - galette.git/commitdiff
Add required attribute on input fields
authorGuillaume AGNIERAY <dev@agnieray.net>
Sat, 11 Mar 2023 11:28:48 +0000 (12:28 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Sat, 11 Mar 2023 15:10:10 +0000 (16:10 +0100)
galette/templates/default/elements/edit_entitleds.html.twig
galette/templates/default/pages/configuration_dynamic_field_form.html.twig
galette/templates/default/pages/configuration_entitled_form.html.twig
galette/templates/default/pages/configuration_payment_type_form.html.twig
galette/templates/default/pages/configuration_payment_types.html.twig
galette/templates/default/pages/configuration_title_form.html.twig
galette/templates/default/pages/configuration_titles.html.twig

index 4b8fa620b6b31096943769597c371c3e8e8b1eea..b5a2bf5d2721d341442491e0fd3aaf62e1b823a7 100644 (file)
                         </span>
                     </td>
                     <td class="left" data-title="{{ _T("Name") }}">
-                        <input size="40" type="text" name="{{ fields.libelle }}"/>
+                        <div class="required field">
+                            <label for="name" class="displaynone">{{ _T("Name") }}</label>
+                            <input size="40" type="text" name="{{ fields.libelle }}" required="required"/>
+                        </div>
                     </td>
                     <td class="left" data-title="{% if class == 'ContributionsTypes' %}{{ _T("Extends membership?") }}{% else %}{{ _T("Priority") }}{% endif %}">
 {% if class == 'ContributionsTypes' %}
index d57303de38e8b9a46f84aaf055e94fe7c3342769..adadf5835a96212ccec08217353f35dd4a839701 100644 (file)
@@ -10,7 +10,7 @@
         <div class="ui bottom attached accordion-styled segment">
             <div class="active content field">
     {% endif %}
-                <div class="inline field">
+                <div class="{% if df.getType != 0 %} required {% endif %}inline field">
                     <label for="field_name">{{ _T("Name:") }}</label>
                     <input type="text" name="field_name" id="field_name" value="{{ df.getName(false) }}"{% if df.getType != 0 %} required="required"{% endif %}/>
                 </div>
index 4d3b68b848674cdd8a5ca57eab8972db918f1ea3..3c9b961fdcfd9ac1e94c4074217af8475077153a 100644 (file)
@@ -8,9 +8,9 @@
 {% if mode != 'ajax' %}
         <div class="ui segment">
 {% endif %}
-            <div class="field inline">
+            <div class="required field inline">
                 <label for="{{ name }}">{{ _T("Name:") }}</label>
-                <input type="text" name="{{ name }}" id="{{ name }}" value="{% if class == 'Status' %}{{ entry.libelle_statut }}{% else %}{{ entry.libelle_type_cotis }}{% endif %}" />
+                <input type="text" name="{{ name }}" id="{{ name }}" value="{% if class == 'Status' %}{{ entry.libelle_statut }}{% else %}{{ entry.libelle_type_cotis }}{% endif %}" required="required" />
             </div>
 {% if class == 'Status' %}
             <div class="field inline">
index 6063cdf2762277f95d8ceafe49192ed6b08cc986..8195129a7f49a9808d1ac4c274e0d0816e2c9678 100644 (file)
@@ -5,13 +5,13 @@
     {% if mode != 'ajax' %}
         <div class="ui segment" id="general">
     {% endif %}
-            <div class="field inline">
+            <div class="required field inline">
                 <label for="name" class="" title="{{ _T("Original string for name, that will be used for translations.") }}">{{ _T("Name:") }}</label>
                 <div class="ui right corner labeled input">
                     <div class="ui corner label">
                         <i class="circular inverted primary link icon info tooltip" title="{{ _T("Original string for name, that will be used for translations.") }}"></i>
                     </div>
-                    <input type="text" name="name" id="name" value="{{ ptype.__get('name') }}" />
+                    <input type="text" name="name" id="name" value="{{ ptype.__get('name') }}" required="required" />
                 </div>
             </div>
     {% if mode != 'ajax' %}
index be36007fd52a066d4696d8ca4272d20cb14dcf88..40fad3dd6817bc3a17d4111b97377106a35062e0 100644 (file)
                                 </span>
                             </td>
                             <td class="left" data-title="{{ _T("Label") }}">
-                                <input size="20" type="text" name="name"/>
+                                <div class="required field">
+                                    <label for="name" class="displaynone">{{ _T("Name") }}</label>
+                                    <input size="20" type="text" name="name" required="required"/>
+                                </div>
                             </td>
                             <td class="center actions_row">
                                 <input type="hidden" name="new" value="1" />
index cbd1d58f765b7c53b7d0553a7ae5cde3d7800a61..766ec325b3b68d0d93edf080cc39363e5890a7ea 100644 (file)
@@ -5,13 +5,13 @@
     {% if mode != 'ajax' %}
         <div class="ui segment" id="general">
     {% endif %}
-            <div class="field inline">
+            <div class="required field inline">
                 <label for="short_label">{{ _T("Short form:") }}</label>
-                <input type="text" name="short_label" id="short_label" value="{{ title.short }}" />
+                <input type="text" name="short_label" id="short_label" value="{{ title.short }}" required="required" />
             </div>
-            <div class="field inline">
+            <div class="required field inline">
                 <label for="long_label">{{ _T("Long form:") }}</label>
-                <input type="text" name="long_label" id="long_label" value="{{ title.long }}" />
+                <input type="text" name="long_label" id="long_label" value="{{ title.long }}" required="required" />
             </div>
         </div>
     {% if mode != 'ajax' %}
index c2e31a00f0ca3489c3b761a230b0986a1b6ec41a..14beb5c50405dd5bc5630a0a24b9f15a630d88a5 100644 (file)
                             </span>
                         </td>
                         <td class="left" data-title="{{ _T("Short form") }}">
-                            <input size="20" type="text" name="short_label"/>
+                            <div class="required field">
+                                <label for="short_label" class="displaynone">{{ _T("Short form") }}</label>
+                                <input size="20" type="text" name="short_label" required="required"/>
+                            </div>
                         </td>
                         <td class="left" data-title="{{ _T("Long form") }}">
-                            <input size="20" type="text" name="long_label"/>
+                            <div class="required field">
+                                <label for="long_label" class="displaynone">{{ _T("Long form") }}</label>
+                                <input size="20" type="text" name="long_label" required="required"/>
+                            </div>
                         </td>
                         <td class="center actions_row">
                             <input type="hidden" name="new" value="1" />