]> WPIA git - gigi.git/commitdiff
add: HTML5-defined 'required' attributes on mandatory input fields
authorFelix Dörre <felix@dogcraft.de>
Sat, 13 Aug 2016 10:17:08 +0000 (12:17 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sat, 13 Aug 2016 12:39:01 +0000 (14:39 +0200)
This is done for client-side form validation as defined in:
https://www.w3.org/TR/html5/forms.html#the-required-attribute

Change-Id: I2f3390d4abdbed3ec68b2a6fef9d48151c7de7ab

12 files changed:
src/org/cacert/gigi/pages/LoginPage.templ
src/org/cacert/gigi/pages/PasswordResetForm.templ
src/org/cacert/gigi/pages/account/ChangePasswordForm.templ
src/org/cacert/gigi/pages/account/domain/DomainAddForm.templ
src/org/cacert/gigi/pages/account/mail/MailAddForm.templ
src/org/cacert/gigi/pages/admin/support/FindUserByDomainForm.templ
src/org/cacert/gigi/pages/admin/support/FindUserByEmailForm.templ
src/org/cacert/gigi/pages/admin/support/SupportEnterTicketForm.templ
src/org/cacert/gigi/pages/orga/AffiliationForm.templ
src/org/cacert/gigi/pages/orga/CreateOrgForm.templ
src/org/cacert/gigi/pages/wot/AssuranceForm.templ
src/org/cacert/gigi/pages/wot/AssureeSearch.templ

index d9c21d382564365da18f4a92e3992536eb70532f..b4d04be89f425822596dbb653ca97a45526e043d 100644 (file)
@@ -1,8 +1,8 @@
 <div class='loginbox'>
 <h1><?=_Login?></h1>
 <p class='smalltext'><?=_Warning! This site requires cookies to be enabled to ensure your privacy and security. This site uses session cookies to store temporary values to prevent people from copying and pasting the session ID to someone else exposing their account, personal details and identity theft as a result.?></p>
 <div class='loginbox'>
 <h1><?=_Login?></h1>
 <p class='smalltext'><?=_Warning! This site requires cookies to be enabled to ensure your privacy and security. This site uses session cookies to store temporary values to prevent people from copying and pasting the session ID to someone else exposing their account, personal details and identity theft as a result.?></p>
-<label for="username"><?=_Email Address?>:</label><input class="form-control" type='text' name="username"/><br />
-<label for="password"><?=_Pass Phrase?>:</label><input class="form-control" type='password' name='password'/><br />
+<label for="username"><?=_Email Address?>:</label><input class="form-control" type='text' name="username" required/><br />
+<label for="password"><?=_Pass Phrase?>:</label><input class="form-control" type='password' name='password' required/><br />
 <button type='submit' name="process" value="Login" class="btn btn-primary"><?=_Login?></button><br /><br />
 <p class='smalltext'><?=_If you are having trouble with your username or password, please visit our !'<a href="http://wiki.cacert.org/wiki/FAQ/LostPasswordOrAccount" target="_new">'wiki page!'</a>' for more information?></p>
 </div>
 <button type='submit' name="process" value="Login" class="btn btn-primary"><?=_Login?></button><br /><br />
 <p class='smalltext'><?=_If you are having trouble with your username or password, please visit our !'<a href="http://wiki.cacert.org/wiki/FAQ/LostPasswordOrAccount" target="_new">'wiki page!'</a>' for more information?></p>
 </div>
index 1d12004d21d8072758e9f74f14358223973c43b4..b43e9152040f4d8403f232122b797c1e422b1db1 100644 (file)
@@ -7,15 +7,15 @@
   <tbody>
   <tr>
     <td><?=_Password reset token (A-Word)?>: </td>
   <tbody>
   <tr>
     <td><?=_Password reset token (A-Word)?>: </td>
-    <td><input type="password" name="private_token"></td>
+    <td><input type="password" name="private_token" required></td>
   </tr>
   <tr>
     <td><?=_New Pass Phrase?><span class="formMandatory">*</span>: </td>
   </tr>
   <tr>
     <td><?=_New Pass Phrase?><span class="formMandatory">*</span>: </td>
-    <td><input type="password" name="pword1"></td>
+    <td><input type="password" name="pword1" required></td>
   </tr>
   <tr>
     <td><?=_Pass Phrase Again?><span class="formMandatory">*</span>: </td>
   </tr>
   <tr>
     <td><?=_Pass Phrase Again?><span class="formMandatory">*</span>: </td>
-    <td><input type="password" name="pword2"></td>
+    <td><input type="password" name="pword2" required></td>
   </tr>
   <tr>
     <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
   </tr>
   <tr>
     <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
index 33f349f7034077e44ecdfbc611f1f40586e75dcf..a0fc45290e0e001805df5a3766102abae4688dcc 100644 (file)
@@ -7,15 +7,15 @@
   <tbody>
   <tr>
     <td><?=_Old Pass Phrase?>: </td>
   <tbody>
   <tr>
     <td><?=_Old Pass Phrase?>: </td>
-    <td><input class="form-control" type="password" name="oldpassword"></td>
+    <td><input class="form-control" type="password" name="oldpassword" required></td>
   </tr>
   <tr>
     <td><?=_New Pass Phrase?><span class="formMandatory">*</span>: </td>
   </tr>
   <tr>
     <td><?=_New Pass Phrase?><span class="formMandatory">*</span>: </td>
-    <td><input class="form-control" type="password" name="pword1"></td>
+    <td><input class="form-control" type="password" name="pword1" required></td>
   </tr>
   <tr>
     <td><?=_Pass Phrase Again?><span class="formMandatory">*</span>: </td>
   </tr>
   <tr>
     <td><?=_Pass Phrase Again?><span class="formMandatory">*</span>: </td>
-    <td><input class="form-control" type="password" name="pword2"></td>
+    <td><input class="form-control" type="password" name="pword2" required></td>
   </tr>
   <tr>
     <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
   </tr>
   <tr>
     <td colspan="2"><span class="formMandatory">*</span><?=_Your password is one of many factors to protect your account from unauthorised access. A good password is hard to guess, long, and contains a diverse set of characters. Learn more in our !'<a href="http://wiki.cacert.org/wiki/FAQ" target="_new">'FAQ!'</a>'.?></td>
index d16aa3efa5c24eda57ab7afc69a3c9ac1b7fcfb1..94e04edc07653b416e4baef698117bab43ab674e 100644 (file)
@@ -7,7 +7,7 @@
 <tbody>
   <tr>
     <td><?=_Domain?> </td>
 <tbody>
   <tr>
     <td><?=_Domain?> </td>
-    <td><input class="form-control" type="text" name="newdomain" value=""> (<?=_In the following:?> <span class='exampleDomainPlace'>example.org</span>)</td>
+    <td><input class="form-control" type="text" name="newdomain" value="" required> (<?=_In the following:?> <span class='exampleDomainPlace'>example.org</span>)</td>
   </tr>
   <?=$pingconfig?>
   <tr>
   </tr>
   <?=$pingconfig?>
   <tr>
index 23d98c4214a15cbb5a95a56c2fcb4c427454b3e3..3132586058f58eef8b48202141a8e958c702a7e4 100644 (file)
@@ -1,7 +1,7 @@
 <table class="table">
   <tr>
     <td><?=_Email Addresses?> </td>
 <table class="table">
   <tr>
     <td><?=_Email Addresses?> </td>
-    <td><input class="form-control" type="text" name="newemail" value=""></td>
+    <td><input class="form-control" type="text" name="newemail" value="" required></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" name="addmail" value="<?=_I own or am authorised to control this email address?>"></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" name="addmail" value="<?=_I own or am authorised to control this email address?>"></td>
index 0eb660d4752682cf91b193781bfcba6cdfc9ccec..2a5a8523f1ba8a6ee8014e7c0ae5eee02ab02c73 100644 (file)
@@ -4,7 +4,7 @@
   </tr>
   <tr>
     <td><?=_Domain?>:</td>
   </tr>
   <tr>
     <td><?=_Domain?>:</td>
-    <td><input class="form-control" type="text" value="" name="domain" placeholder="<?=_For search by ID use # prefix e.g. #123456?>"></td>
+    <td><input class="form-control" type="text" value="" name="domain" placeholder="<?=_For search by ID use # prefix e.g. #123456?>" required></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" value="<?=_Next?>" name="process"></td>
   </tr>
   <tr>
     <td colspan="2"><input type="submit" value="<?=_Next?>" name="process"></td>
index a6b4549c63d9901f0ea86dfe09249949fbb14bc5..8563721efc817f2f9dc1c809973dfed08b4bbd77 100644 (file)
@@ -15,7 +15,7 @@
   </tr>
   <tr>
     <td><?=_Email?>:</td>
   </tr>
   <tr>
     <td><?=_Email?>:</td>
-    <td><input class="form-control" name="email" value="" size="30" title="<?=_use % as wildcard?>" placeholder="<?=_use % as wildcard?>" type="text"/></td>
+    <td><input class="form-control" name="email" value="" size="30" title="<?=_use % as wildcard?>" placeholder="<?=_use % as wildcard?>" type="text" required/></td>
   </tr>
   <tr>
     <td colspan="2"><input name="process" value="<?=_Next?>" type="submit"/></td>
   </tr>
   <tr>
     <td colspan="2"><input name="process" value="<?=_Next?>" type="submit"/></td>
index 292e8b2d8ed68c1f0c11952ed14cc4d2cb1ecef7..27b901b43a48787dfbacad61bf51c77ee210033e 100644 (file)
@@ -4,7 +4,7 @@
         </tr>
         <tr>
             <td><?=_Ticket no?>:</td>
         </tr>
         <tr>
             <td><?=_Ticket no?>:</td>
-            <td><input type="text" class="form-control" <? if($ticketNo) {?>value="<?=$ticketNo?>" <? } ?>name="ticketno"></td>
+            <td><input type="text" class="form-control" <? if($ticketNo) {?>value="<?=$ticketNo?>" <? } ?>name="ticketno" required></td>
         </tr>
         <tr>
             <td colspan="2"><input type="submit" name="setTicket" value="<?=_Set ticket number?>"></td>
         </tr>
         <tr>
             <td colspan="2"><input type="submit" name="setTicket" value="<?=_Set ticket number?>"></td>
index a67730f8f0700a6d03e5012802cba25a0d52a150..84be5cc4d6f5f257392583615f4503c10aa08522 100644 (file)
@@ -15,7 +15,7 @@
 <? } ?>
   <tr>
     <td></td>
 <? } ?>
   <tr>
     <td></td>
-    <td><input class="form-control" type="text" name="email"></td>
+    <td><input class="form-control" type="text" name="email" required></td>
     <td><input type="checkbox" name="master" value="y"></td>
     <td><input type="submit" name="do_affiliate" value="<?=_Add?>"></td>
   </tr>
     <td><input type="checkbox" name="master" value="y"></td>
     <td><input type="submit" name="do_affiliate" value="<?=_Add?>"></td>
   </tr>
index 7f34782ba86f325e56d76b896bad6ffd55312802..7fdd98deeb63be2e4a8d20c016d06dc11adc771f 100644 (file)
   </tr>
   <tr>
     <td><?=_Organisation Name?>:</td>
   </tr>
   <tr>
     <td><?=_Organisation Name?>:</td>
-    <td><input class="form-control" type="text" name="O" value="<?=$O?>" maxlength="64" size="90">
+    <td><input class="form-control" type="text" name="O" value="<?=$O?>" maxlength="64" size="90" required>
         <?=_(max. 64 characters)?>
     </td>
   </tr>
   <tr>
     <td><?=_Town/Suburb?>:</td>
         <?=_(max. 64 characters)?>
     </td>
   </tr>
   <tr>
     <td><?=_Town/Suburb?>:</td>
-    <td><input class="form-control" type="text" name="L" value="<?=$L?>" maxlength="255" size="90"></td>
+    <td><input class="form-control" type="text" name="L" value="<?=$L?>" maxlength="255" size="90" required></td>
   </tr>
   <tr>
     <td><?=_State/Province?>:</td>
   </tr>
   <tr>
     <td><?=_State/Province?>:</td>
-    <td><input class="form-control" type="text" name="ST" value="<?=$ST?>" maxlength="255" size="90"></td>
+    <td><input class="form-control" type="text" name="ST" value="<?=$ST?>" maxlength="255" size="90" required></td>
   </tr>
   <tr>
     <td><?=_Country?>:</td>
   </tr>
   <tr>
     <td><?=_Country?>:</td>
index 004710aa49c158a53bf5589766719d3e716a23bb..297397c62e34fccba775503310d42721b6044bc3 100644 (file)
@@ -1,4 +1,4 @@
-<table class="table">
+       <table class="table">
 <thead>
 <tr><th colspan="2"><?=_Verification Confirmation?></th></tr>
 </thead>
 <thead>
 <tr><th colspan="2"><?=_Verification Confirmation?></th></tr>
 </thead>
                <td><span class="accountdetail dob"><?=$dob?> (<?=$dobFmt2?>)</span></td>
        </tr>
        <tr>
                <td><span class="accountdetail dob"><?=$dob?> (<?=$dobFmt2?>)</span></td>
        </tr>
        <tr>
-               <td><input type="checkbox" name="certify" value="1"></td>
+               <td><input type="checkbox" name="certify" value="1" required></td>
                <td><?=_I certify that ${name} has appeared in person.?></td>
        </tr>
        <tr>
                <td><?=_Location?></td>
                <td><?=_I certify that ${name} has appeared in person.?></td>
        </tr>
        <tr>
                <td><?=_Location?></td>
-               <td><input class="form-control" type="text" name="location" value="<?=$location?>"></td>
+               <td><input class="form-control" type="text" name="location" value="<?=$location?>" required></td>
        </tr>
        <tr>
                <td><?=_Date?></td>
        </tr>
        <tr>
                <td><?=_Date?></td>
-               <td><input class="form-control" type="text" name="date" value="<?=$date?>"><br/><?=_The date when the verification took place. Please adjust the date if you verified the person on a different day (YYYY-MM-DD).?></td>
+               <td><input class="form-control" type="text" name="date" value="<?=$date?>" required><br/><?=_The date when the verification took place. Please adjust the date if you verified the person on a different day (YYYY-MM-DD).?></td>
        </tr>
        <tr>
        </tr>
        <tr>
-               <td><input type="checkbox" name="assertion" value="1"></td>
+               <td><input type="checkbox" name="assertion" value="1" required></td>
                <td><?=_I believe that the assertion of identity I am making is correct, complete and verifiable. I have seen original documentation attesting to this identity. I accept that the SomeCA Arbitrator may call upon me to provide evidence in any dispute, and I may be held responsible.?></td>
        </tr>
        <tr>
                <td><?=_I believe that the assertion of identity I am making is correct, complete and verifiable. I have seen original documentation attesting to this identity. I accept that the SomeCA Arbitrator may call upon me to provide evidence in any dispute, and I may be held responsible.?></td>
        </tr>
        <tr>
-               <td><input type="checkbox" name="rules" value="1"></td>
+               <td><input type="checkbox" name="rules" value="1" required></td>
                <td><?=_I have read and understood the Terms of Service (!'<a href="/policy/TermsOfService.html">'ToS!'</a>'), Verification Policy and the Verification Handbook. I am making this verification subject to and in compliance with the ToS, Verification Policy and Handbook.?></td>
        </tr>
        <tr>
                <td><?=_I have read and understood the Terms of Service (!'<a href="/policy/TermsOfService.html">'ToS!'</a>'), Verification Policy and the Verification Handbook. I am making this verification subject to and in compliance with the ToS, Verification Policy and Handbook.?></td>
        </tr>
        <tr>
@@ -45,7 +45,7 @@
        </tr>
        <tr>
                <td><?=_Points?></td>
        </tr>
        <tr>
                <td><?=_Points?></td>
-               <td><input class="form-control" type="text" name="points"><br/>(Max. <?=$maxpoints?>)</td>
+               <td><input class="form-control" type="text" name="points" required><br/>(Max. <?=$maxpoints?>)</td>
        </tr>
        <tr>
                <td><?=_Type?></td>
        </tr>
        <tr>
                <td><?=_Type?></td>
index de9282e5996169fc46c4dae77245809e35ba8d99..7fc80b173b00f846f3af1f556f6b64ca05cddbbf 100644 (file)
@@ -8,7 +8,7 @@
   <tbody>
   <tr>
     <td><?=_Email?>: </td>
   <tbody>
   <tr>
     <td><?=_Email?>: </td>
-    <td><input class="form-control" type="text" name="email"></td>
+    <td><input class="form-control" type="text" name="email" required></td>
   </tr>
   <tr>
     <td><?=_Date of Birth?><br>
   </tr>
   <tr>
     <td><?=_Date of Birth?><br>