]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 962812: Use the "required" attribute where appropriate
authorSunil Joshi <joshi_sunil@in.com>
Sun, 23 Mar 2014 00:56:29 +0000 (01:56 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sun, 23 Mar 2014 00:56:29 +0000 (01:56 +0100)
r=LpSolit a=justdave

26 files changed:
template/en/default/account/auth/login.html.tmpl
template/en/default/account/create.html.tmpl
template/en/default/account/email/confirm-new.html.tmpl
template/en/default/account/email/confirm.html.tmpl
template/en/default/account/password/set-forgotten-password.html.tmpl
template/en/default/admin/classifications/edit-common.html.tmpl
template/en/default/admin/components/edit-common.html.tmpl
template/en/default/admin/custom_fields/edit-common.html.tmpl
template/en/default/admin/fieldvalues/create.html.tmpl
template/en/default/admin/fieldvalues/edit.html.tmpl
template/en/default/admin/flag-type/edit.html.tmpl
template/en/default/admin/groups/create.html.tmpl
template/en/default/admin/groups/edit.html.tmpl
template/en/default/admin/keywords/create.html.tmpl
template/en/default/admin/keywords/edit.html.tmpl
template/en/default/admin/milestones/create.html.tmpl
template/en/default/admin/milestones/edit.html.tmpl
template/en/default/admin/products/create.html.tmpl
template/en/default/admin/products/edit-common.html.tmpl
template/en/default/admin/sudo.html.tmpl
template/en/default/admin/users/userdata.html.tmpl
template/en/default/admin/versions/create.html.tmpl
template/en/default/admin/versions/edit.html.tmpl
template/en/default/bug/field.html.tmpl
template/en/default/global/userselect.html.tmpl
template/en/default/list/quips.html.tmpl

index 27c0690af5ffb78dfceb61c100220c2921c7f03b..bf20edb8b51cf512efb34584d5eabde8fae11596 100644 (file)
       </th>
       <td>
         <input size="35" id="Bugzilla_login" name="Bugzilla_login"
-               [%- ' type="email"' UNLESS Param('emailsuffix') %] autofocus>
+               [%- ' type="email"' UNLESS Param('emailsuffix') %] autofocus required>
         [% Param('emailsuffix') FILTER html %]
       </td>
     </tr>
     <tr>
       <th><label for="Bugzilla_password">Password:</label></th>
       <td>
-        <input type="password" size="35" id="Bugzilla_password" name="Bugzilla_password">
+        <input type="password" size="35" id="Bugzilla_password" name="Bugzilla_password" required>
       </td>
     </tr>
 
       If you have an account, but have forgotten your password,
       enter your login name below and submit a request
       to change your password.<br>
-      <input size="35" name="loginname">
+      <input size="35" name="loginname" required>
       <input type="hidden" id="token" name="token" value="[% issue_hash_token(['reqpw']) FILTER html %]">
       <input type="submit" id="request" value="Reset Password">
     </form>
index 1b5a4daa8d5281058e4f08a5b14a16d10625e225..5711a726f3b4dd98fe7129f67a483ee0ad5a1c10 100644 (file)
@@ -72,7 +72,7 @@
     [% END %]
   </span>
   <input size="35" id="login" name="login" autofocus
-         [%- ' type="email"' UNLESS Param('emailsuffix') %]>
+         [%- ' type="email"' UNLESS Param('emailsuffix') %] required>
   [% Param('emailsuffix') FILTER html %]
   <input type="hidden" id="token" name="token" value="[% issue_hash_token(['create_account']) FILTER html %]">
   <input type="submit" id="send" value="Send">
index ec8d5a4743601fc57220fc4e483fa52c948c0ca4..09509769884090f9a2b14f4035eedb512824baab 100644 (file)
     <tr>
       <th><label for="passwd1">Type your password</label>:</th>
       <td>
-        <input type="password" id="passwd1" name="passwd1" value="">
+        <input type="password" id="passwd1" name="passwd1" value="" required>
         (minimum [% constants.USER_PASSWORD_MIN_LENGTH FILTER none %] characters)
       </td>
     </tr>
     <tr>
       <th><label for="passwd2">Confirm your password</label>:</th>
-      <td><input type="password" id="passwd2" name="passwd2" value=""></td>
+      <td><input type="password" id="passwd2" name="passwd2" value="" required></td>
     </tr>
     <tr>
       <th>&nbsp;</th>
index 6fc17187839154ac86c4baadf3845639e774dce6..8edc7a9badf434d702f0023f1537577c34a0bdbc 100644 (file)
@@ -23,7 +23,7 @@
   <table>
     <tr>
       <th>Password:</th>
-      <td><input type="password" name="password" size="36"></td>
+      <td><input type="password" name="password" size="36" required></td>
     </tr>
     <tr>
       <th>&nbsp;</th>
index b203e66e9b421b2b96fa54b555cdd5d25ec71d59..eca11174f3da3bd6cf343245267a6bf49400cec1 100644 (file)
     <tr>
       <th>New password:</th>
       <td>
-        <input type="password" name="password">
+        <input type="password" name="password" required>
       </td>
     </tr>
     
     <tr>
       <th>Confirm new password:</th>
       <td>
-        <input type="password" name="matchpassword">
+        <input type="password" name="matchpassword" required>
       </td>
     </tr>
-    
+     
     <tr>
       <th>&nbsp;</th>
       <td>
index 9dd6c1676b1fe816df654a18c442b9659125b7c6..c2bae5c42933ff371ad7ce75de4db6bc47bbb352 100644 (file)
@@ -13,7 +13,7 @@
 <tr>
   <th>Classification:</th>
   <td><input size=64 maxlength=64 name="classification" 
-             value="[% classification.name FILTER html %]"></td>
+             value="[% classification.name FILTER html %]" required></td>
 </tr>
 <tr>
   <th>Description:</th>
index 00b80baa8d402e4d4d73c59e48323e226bf80aca..72300af79ca0b6436570c6bcf1b0e84a06d051cb 100644 (file)
@@ -17,7 +17,7 @@
 <tr>
   <th><label for="component">Component:</label></th>
   <td><input size="64" maxlength="64" name="component" id="component"
-             value="[%- comp.name FILTER html %]"></td>
+             value="[%- comp.name FILTER html %]" required></td>
 </tr>
 <tr>
   <th><label for="[% desc_name FILTER html %]">Component Description:</label></th>
@@ -29,6 +29,7 @@
       cols           = 64
       wrap           = 'virtual'
       defaultcontent = comp.description
+      mandatory      = 1
     %]
   </td>
 </tr>
@@ -40,6 +41,7 @@
        id => "initialowner"
        value => comp.default_assignee.login
        size => 64
+       mandatory => 1
      %]
   </td>
 </tr>
index f54073cfe8c09e222cefa6684fe37e277f4629b3..6c22bb81fd9efe8d1b204c861f5717ee7a555aac 100644 (file)
@@ -19,7 +19,7 @@
       [% IF field %]
         [% field.name FILTER html %]
       [% ELSE %]
-        <input type="text" id="name" name="name" value="cf_" size="40" maxlength="64">
+        <input type="text" id="name" name="name" value="cf_" size="40" maxlength="64" required>
       [% END %]
     </td>
 
@@ -37,7 +37,7 @@
     <th><label for="desc">Description:</label></th>
     <td>
       <input type="text" id="desc" name="desc" size="40"
-             value="[% field.description FILTER html %]">
+             value="[% field.description FILTER html %]" required>
     </td>
 
     <th>
index 4d07d5b0eb83cd35ce58e02aa037c1168e0a15e4..8d1dbc8b977144ed7d1a390324cc6fc480c2fb89 100644 (file)
@@ -29,7 +29,7 @@
       <th><label for="value">Value:</label></th>
       <td>
         <input id="value" name="value" size="30"
-               maxlength="[% constants.MAX_FIELD_VALUE_SIZE FILTER none %]">
+               maxlength="[% constants.MAX_FIELD_VALUE_SIZE FILTER none %]" required>
       </td>
     </tr>
     <tr>
index dbe222590b721571feb2791fab40656e4af2da4a..2630fee9244bd92529c473d795fb63579ff1ca2a 100644 (file)
@@ -32,7 +32,7 @@
         [% ELSE %]
           <input id="value_new" name="value_new" size="20"
                  maxlength="[% constants.MAX_FIELD_VALUE_SIZE FILTER none %]"
-                 value="[% value.name FILTER html %]">
+                 value="[% value.name FILTER html %]" required>
         [% END %]
       </td>
     </tr>
index e52d58a9a5d1b193d2aed10eb4e739df890cbef1..4ee4a999ca14cfb97d29a8374530913bc1c7fb45 100644 (file)
@@ -52,7 +52,7 @@
       <td>
         a short name identifying this type.<br>
         <input type="text" name="name" value="[% type.name FILTER html %]" size="50"
-               maxlength="50" [%- ' disabled="disabled"' UNLESS can_fully_edit %]>
+               maxlength="50" [%- ' disabled="disabled"' UNLESS can_fully_edit %] required>
       </td>
     </tr>
 
@@ -66,6 +66,7 @@
           cols           = 80
           defaultcontent = type.description
           disabled       = !can_fully_edit
+          mandatory      = 1
         %]
       </td>
     </tr>
         don't care what order the types appear in or if you want them to appear
         in alphabetical order.<br>
         <input type="text" name="sortkey" value="[% type.sortkey || 0 FILTER html %]" size="5"
-               maxlength="5" [% ' disabled="disabled"' UNLESS can_fully_edit %]>
+               maxlength="5" [% ' disabled="disabled"' UNLESS can_fully_edit %] required>
       </td>
     </tr>
 
index 06396926cdf2c3edf0996fc64627b5f200ec0ab5..8f9be1c7a30071f9c527f80c23ad50b4fa8a1f47 100644 (file)
   <table id="admin_table_edit">
     <tr>
       <th>Group Name:</th>
-      <td><input size="60" maxlength="255" name="name"></td>
+      <td><input size="60" maxlength="255" name="name" required></td>
     </tr>
     <tr>
       <th>Description:</th>
-      <td><input size="60" name="desc"></td>
+      <td><input size="60" name="desc" required></td>
     </tr>
     <tr>
       <th>User Regexp:</th>
index c9883ce42da16aaec6dadce50ef3f06261ea6f03..1cc948ea2432f7741b7c8d02013c2b76a356bc3c 100644 (file)
@@ -32,7 +32,7 @@
       <td>
         [% IF group.is_bug_group %]
           <input type="text" name="name" size="60" maxlength="255"
-                 value="[% group.name FILTER html %]">
+                 value="[% group.name FILTER html %]" required>
         [% ELSE %]
           [% group.name FILTER html %]
         [% END %]
@@ -44,7 +44,7 @@
       <td>
         [% IF group.is_bug_group %]
           <input type="text" name="desc" size="60"
-                 value="[% group.description FILTER html %]">
+                 value="[% group.description FILTER html %]" required>
         [% ELSE %]
           [% group.description FILTER html %]
         [% END %]
index 3c310cce04b119dca239e32fb48b28d0ce4d671a..21ecaf920088fe5162d74877905477de2cff5a49 100644 (file)
@@ -20,7 +20,7 @@
   <table id="admin_table_edit">
     <tr>
       <th>Name:</th>
-      <td><input size="64" maxlength="64" name="name" value=""></td>
+      <td><input size="64" maxlength="64" name="name" value="" required></td>
     </tr>
     <tr>
       <th>Description:</th>
@@ -30,6 +30,7 @@
           minrows = 4
           cols    = 64
           wrap    = 'virtual'
+          mandatory = 1
         %]
       </td>
     </tr>
index 1c3d1c3c55181f1df0852ab800e0f80392bd69e9..23158d36fc60c6ce5e8930317754b45d2f51fb70 100644 (file)
@@ -20,7 +20,7 @@
     <tr>
       <th>Name:</th>
       <td><input size="64" maxlength="64" name="name" 
-                 value="[% keyword.name FILTER html %]"></td>
+                 value="[% keyword.name FILTER html %]" required></td>
     </tr>
     <tr>
       <th>Description:</th>
@@ -31,6 +31,7 @@
           cols           = 64
           wrap           = 'virtual'
           defaultcontent = keyword.description
+          mandatory      = 1
         %]
       </td>
     </tr>
index d15e43d55692f6b46d6ec7e0128052dabe21515f..4f1a2414400feaa095520a26381c67e794848aa3 100644 (file)
@@ -25,7 +25,7 @@
     <tr>
       <th><label for="milestone">Milestone:</label></th>
       <td><input id="milestone" size="64" maxlength="64" name="milestone"
-                 autofocus></td>
+                 autofocus required></td>
     </tr>
     <tr>
       <th><label for="sortkey">Sortkey:</label></th>
index 86d0ebc1e2226e90b02b3c9e56329fc5fc419678..cbc7330fe24a8ceb2936dd6d3941d0eedcbe446f 100644 (file)
@@ -26,7 +26,7 @@
     <tr>
       <th><label for="milestone">Milestone:</label></th>
       <td><input id="milestone" size="64" maxlength="64" name="milestone" value="
-      [%- milestone.name FILTER html %]"></td>
+      [%- milestone.name FILTER html %]" required></td>
     </tr>
     <tr>
       <th><label for="sortkey">Sortkey:</label></th>
index da63a2ff5c12489cc819e35d11778de4810e0c64..b34f67b629a2441dcd2af54b8447a56b7aad5655 100644 (file)
@@ -37,7 +37,7 @@
     <tr>
       <th>Version:</th>
       <td><input size="20" maxlength="64" name="version" 
-                value="[% version FILTER html %]">
+                value="[% version FILTER html %]" required>
       </td>
     </tr>
     <tr>
index 6faa0746919262f4b425ee9bd43614b9604c8ad7..baf5015ae0ba4c7f47abb24c81de4760d711e189 100644 (file)
 <tr>
   <th>Product:</th>
   <td><input size="64" maxlength="64" name="product" 
-             value="[% product.name FILTER html %]">
+             value="[% product.name FILTER html %]" required>
   </td>
 </tr>
 <tr>
   <th>Description:</th>
-  <td><textarea rows="4" cols="64" wrap="virtual" name="description">
+  <td><textarea rows="4" cols="64" wrap="virtual" name="description" required>
         [% product.description FILTER html %]</textarea>
   </td>
 </tr>
index a5f13a015d66f28e314fc7f64cbce7a6a9825212..d4faf4ea769ed869d56c33a7d8b9e78891039349 100644 (file)
@@ -41,6 +41,7 @@
        value => target_login_default
        accesskey => "u"
        size => 30
+       mandatory => 1
     %]
   </p>
   
@@ -69,7 +70,7 @@
       password</label>:
       <input type="hidden" name="Bugzilla_login" value="
       [%- user.login FILTER html %]">
-      <input type="password" id="Bugzilla_password" name="Bugzilla_password" size="20">
+      <input type="password" id="Bugzilla_password" name="Bugzilla_password" size="20" required>
       <br>
       This is done for two reasons.  First of all, it is done to reduce 
       the chances of someone doing large amounts of damage using your 
index 8cdc767e4f2ce5585d587c2936a42dc000bdee43..c08cd001808a3dcb83641f69ad47888da4e8405c 100644 (file)
@@ -23,7 +23,7 @@
     [% IF editusers %]
       <input size="64" maxlength="255" id="login" name="login"
              value="[% otheruser.login FILTER html %]"
-             [%- " autofocus" UNLESS editform %]>
+             [%- " autofocus" UNLESS editform %] required>
       [% IF editform %]
         [% IF !otheruser.in_group('bz_sudo_protect') %]
           <br>
@@ -72,7 +72,7 @@
     <th><label for="password">Password:</label></th>
     <td>
       <input type="password" size="16" name="password" id="password"
-             value="" autocomplete="off">
+             value="" autocomplete="off" [% 'required' IF !editform %]>
       [% IF password_complexity == "mixed_letters" %] 
         (Password must contain at least one UPPER and one lowercase letter.)
       [% ELSIF password_complexity == "letters_numbers" %] 
index 46bd38c17c2f8c2f1c25a090e2f28e0e8a7b7228..648adcebd754ea38bd95a701f6a9f578f1ad72c5 100644 (file)
@@ -25,7 +25,7 @@
     <tr>
       <th><label for="version">Version:</label></th>
       <td><input id="version" size="64" maxlength="64" name="version"
-                 value=""></td>
+                 value="" required></td>
     </tr>
   </table>
   <input type="submit" id="create" value="Add">
index 4ea202c04a279fe504464ce5df636dcfdfa28950..1ef0b2f66ecf52c1ecbb04f880458610b77d900d 100644 (file)
@@ -26,7 +26,7 @@
       <th><label for="version">Version:</label></th>
       <td>
         <input id="version" size="64" maxlength="64" name="version"
-               value="[% version.name FILTER html %]">
+               value="[% version.name FILTER html %]" required>
       </td>
     </tr>
     <tr>
index b3b92e19828ae95e1d7cf84d632086c9d7cce903..88200fdfa18d2e44ac92f7d4630efefb0765eb72 100644 (file)
                value="[% value FILTER html %]" size="40"
                maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]"
                [% ' pattern="\d+"' IF field.type == constants.FIELD_TYPE_INTEGER %]
-               [% ' aria-required="true"' IF field.is_mandatory %]>
+               [% ' aria-required="true" required' IF field.is_mandatory %]>
     [% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
       [% size = (field.type == constants.FIELD_TYPE_DATE) ? 10 : 20 %]
       <input name="[% field.name FILTER html %]" size="[% size FILTER none %]"
              id="[% field.name FILTER html %]"
              value="[% value FILTER html %]"
-             [% ' aria-required="true"' IF field.is_mandatory %]
+             [% ' aria-required="true" required' IF field.is_mandatory %]
              onchange="updateCalendarFromField(this)">
       <button type="button" class="calendar_button"
               id="button_calendar_[% field.name FILTER html %]"
@@ -66,7 +66,7 @@
         <span id="[% field.name FILTER html %]_input_area">
           <input name="[% field.name FILTER html %]" id="[% field.name FILTER html %]"
                  value="[% value FILTER html %]" size="7"
-                 [% ' aria-required="true"' IF field.is_mandatory %]>
+                 [% ' aria-required="true" required' IF field.is_mandatory %]>
 
         </span>
 
@@ -94,7 +94,7 @@
                         [% SET field_size = field.legal_values.size %]
                     [% END %]
                     size="[% field_size FILTER html %]" multiple="multiple"
-                    [% ' aria-required="true"' IF field.is_mandatory %]
+                    [% ' aria-required="true" required' IF field.is_mandatory %]
                 [% END %]
                 >
           [% IF allow_dont_change %]
index 828c4bb5884d34e97231c62a36061a87eae199c4..e2210c6f2deb5a5a61d6dc7647ddf572f1e6f241 100644 (file)
@@ -20,6 +20,7 @@
   # multiple: optional, do multiselect box, value is size (height) of box
   # custom_userlist: optional, specify a limited list of users to use
   # field_title: optional, extra information to display as a tooltip
+  # mandatory: optional; if true, the field cannot be empty.
   #%]
 
 [% IF Param("usemenuforusers") %]
@@ -31,6 +32,7 @@
   [% IF accesskey %] accesskey="[% accesskey FILTER html %]" [% END %]
   [% IF multiple %] multiple="multiple" size="[% multiple FILTER html %]" [% END %]
   [% IF field_title %] title="[% field_title FILTER html %]" [% END %]
+  [% IF mandatory %] required [% END %]
 >
   [% IF emptyok %]
     <option value=""></option>
@@ -83,6 +85,7 @@
     [% IF field_title %] title="[% field_title FILTER html %]" [% END %]
     [% IF size %] size="[% size FILTER html %]" [% END %]
     [% IF id %] id="[% id FILTER html %]" [% END %]
+    [% IF mandatory %] required [% END %]
   >
   [% IF feature_enabled('jsonrpc') && Param('ajax_user_autocompletion') && id %]
     <div id="[% id FILTER html %]_autocomplete_container"></div>
index 4bb761dc18429d043763e4875b49b46175d5a003..8fb89af7ca82af45626e1196636c250813c3792c 100644 (file)
@@ -38,7 +38,7 @@
     <input type="hidden" name="action" value="add">
     <input type="hidden" name="token"
            value="[% issue_hash_token(['create-quips']) FILTER html %]">
-    <input size="80" name="quip" maxlength="512">
+    <input size="80" name="quip" maxlength="512" required>
     <p>
       <input type="submit" id="add" value="Add This Quip">
     </p>