Browse Source

Consistent button type (#3039)

Alec Rust 3 years ago
parent
commit
a865c272ae

+ 15 - 5
web/templates/pages/add_cron.html

@@ -42,7 +42,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -71,7 +73,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -139,7 +143,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -210,7 +216,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -321,7 +329,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>

+ 15 - 5
web/templates/pages/edit_cron.html

@@ -42,7 +42,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -71,7 +73,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -139,7 +143,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -210,7 +216,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>
@@ -321,7 +329,9 @@
             </select>
           </div>
           <div class="u-pt10">
-            <input type="submit" value="<?=_('generate');?>" class="button button-secondary">
+            <button type="submit" class="button button-secondary">
+              <?=_('generate');?>
+            </button>
           </div>
         </form>
       </div>

+ 6 - 2
web/templates/pages/generate_ssl.html

@@ -58,8 +58,12 @@
           <input type="text" class="form-control" name="v_org" id="v_org" value="<?=htmlentities(trim($v_org, "'")) ?>">
         </div>
         <div class="u-side-by-side">
-          <div><input type="submit" class="button" name="generate" value="<?=_('Ok');?>"></div>
-          <div><input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="<?=$back?>"></div>
+          <button type="submit" class="button" name="generate">
+            <?=_('Ok');?>
+          </button>
+          <button type="button" class="button button-secondary" onclick="<?=$back?>">
+            <?=_('Back');?>
+          </button>
         </div>
       </div>
     </div>

+ 3 - 1
web/templates/pages/list_ssl.html

@@ -41,7 +41,9 @@
           <textarea class="form-control u-min-height100" name="v_csr" id="v_csr"><?=$v_csr ?></textarea>
         </div>
         <div>
-          <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="<?=$back ?>">
+          <button type="button" class="button button-secondary" onclick="<?=$back?>">
+            <?=_('Back');?>
+          </button>
         </div>
       </div>
     </div>

+ 2 - 2
web/templates/pages/login/login.html

@@ -11,9 +11,9 @@
     <?php if (isset($error)) echo $error ?>
     <div class="u-mb20">
       <label for="user" class="form-label"><?=_('Username');?></label>
-      <input type="text" class="form-control" name="user" id="user" tabindex="1" autofocus>
+      <input type="text" class="form-control" name="user" id="user" autofocus>
     </div>
-    <button tabindex="3" type="submit" class="button">
+    <button type="submit" class="button">
       <i class="fas fa-sign-in-alt"></i><?=_('Next');?>
     </button>
   </form>

+ 6 - 4
web/templates/pages/login/login_1.html

@@ -13,18 +13,20 @@
       <label for="password" class="form-label u-side-by-side">
         <?=_('Password');?>
         <?php if ($_SESSION['POLICY_SYSTEM_PASSWORD_RESET'] !== 'no' ) {?>
-          <a tabindex="5" class="label-link" href="/reset/">
+          <a class="label-link" href="/reset/">
             <?=_('forgot password');?>
           </a>
         <?php } ?>
       </label>
-      <input type="password" class="form-control" name="password" id="password" tabindex="2" autofocus>
+      <input type="password" class="form-control" name="password" id="password" autofocus>
     </div>
     <div class="u-side-by-side">
-      <button tabindex="3" type="submit" class="button">
+      <button type="submit" class="button">
         <i class="fas fa-sign-in-alt"></i><?=_('Login');?>
       </button>
-      <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/login/?logout=true'">
+      <button type="button" class="button button-secondary" onclick="location.href='/login/?logout=true'">
+        <?=_('Back');?>
+      </button>
     </div>
   </form>
 </div>

+ 6 - 4
web/templates/pages/login/login_2.html

@@ -12,17 +12,19 @@
     <div class="u-mb20">
       <label for="twofa" class="form-label u-side-by-side">
         <?=_('2FA Token');?>
-        <a tabindex="5" class="label-link" href="/reset2fa/">
+        <a class="label-link" href="/reset2fa/">
           <?=_('Forgot token');?>
         </a>
       </label>
-      <input type="text" class="form-control" name="twofa" id="twofa" tabindex="2" autofocus>
+      <input type="text" class="form-control" name="twofa" id="twofa" autofocus>
     </div>
     <div class="u-side-by-side">
-      <button tabindex="3" type="submit" class="button">
+      <button type="submit" class="button">
         <i class="fas fa-sign-in-alt"></i><?=_('Login');?>
       </button>
-      <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/login/?logout'">
+      <button type="button" class="button button-secondary" onclick="location.href='/login/?logout'">
+        <?=_('Back');?>
+      </button>
     </div>
   </form>
 </div>

+ 4 - 4
web/templates/pages/login/login_a.html

@@ -11,20 +11,20 @@
     <?php if (isset($error)) echo $error ?>
     <div class="u-mb10">
       <label for="user" class="form-label"><?=_('Username');?></label>
-      <input type="text" class="form-control" name="user" id="user" tabindex="1" autofocus>
+      <input type="text" class="form-control" name="user" id="user" autofocus>
     </div>
     <div class="u-mb20">
       <label for="password" class="form-label u-side-by-side">
         <?=_('Password');?>
         <?php if ($_SESSION['POLICY_SYSTEM_PASSWORD_RESET'] !== 'no' ) {?>
-          <a tabindex="5" class="label-link" href="/reset/">
+          <a class="label-link" href="/reset/">
             <?=_('forgot password');?>
           </a>
         <?php } ?>
       </label>
-      <input type="password" class="form-control" name="password" id="password" tabindex="2" autofocus>
+      <input type="password" class="form-control" name="password" id="password" autofocus>
     </div>
-    <button tabindex="3" type="submit" class="button">
+    <button type="submit" class="button">
       <i class="fas fa-sign-in-alt"></i><?=_('Next');?>
     </button>
   </form>

+ 11 - 5
web/templates/pages/login/reset2fa.html

@@ -9,7 +9,9 @@
       </h1>
       <?php if (isset($ERROR)) echo $ERROR ?>
       <div class="u-mt20">
-        <input type="button" class="button" value="<?=_('Log in');?>" onclick="location.href='/login/'">
+        <button type="button" class="button button-secondary" onclick="location.href='/login/'">
+          <?=_('Log in');?>
+        </button>
       </div>
     </div>
   <?php } else { ?>
@@ -21,15 +23,19 @@
       <?php if (isset($ERROR)) echo $ERROR ?>
       <div class="u-mb10">
         <label for="user" class="form-label"><?=_('Username');?></label>
-        <input type="text" class="form-control" name="user" id="user" tabindex="1">
+        <input type="text" class="form-control" name="user" id="user">
       </div>
       <div class="u-mb20">
         <label for="twofa" class="form-label"><?=_('2FA Reset Code');?></label>
-        <input type="text" class="form-control" name="twofa" id="twofa" tabindex="1">
+        <input type="text" class="form-control" name="twofa" id="twofa">
       </div>
       <div class="u-side-by-side">
-        <input tabindex="2" type="submit" value="<?=_('Submit');?>" class="button">
-        <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/login/?logout'">
+        <button type="submit" class="button">
+          <?=_('Submit');?>
+        </button>
+        <button type="button" class="button button-secondary" onclick="location.href='/login/?logout'">
+          <?=_('Back');?>
+        </button>
       </div>
     </form>
   <?php } ?>

+ 8 - 4
web/templates/pages/login/reset_1.html

@@ -10,15 +10,19 @@
     <?php if (isset($ERROR)) echo $ERROR ?>
     <div class="u-mb10">
       <label for="user" class="form-label"><?=_('Username');?></label>
-      <input type="text" class="form-control" name="user" id="user" tabindex="1">
+      <input type="text" class="form-control" name="user" id="user">
     </div>
     <div class="u-mb20">
       <label for="email" class="form-label"><?=_('Email');?></label>
-      <input type="email" class="form-control" name="email" id="email" tabindex="1">
+      <input type="email" class="form-control" name="email" id="email">
     </div>
     <div class="u-side-by-side">
-      <input tabindex="2" type="submit" value="<?=_('Submit');?>" class="button">
-      <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/login/?logout'">
+      <button type="submit" class="button">
+        <?=_('Submit');?>
+      </button>
+      <button type="button" class="button button-secondary" onclick="location.href='/login/?logout'">
+        <?=_('Back');?>
+      </button>
     </div>
   </form>
 </div>

+ 7 - 3
web/templates/pages/login/reset_2.html

@@ -15,11 +15,15 @@
       <input type="hidden" name="token" value="<?=htmlentities($_SESSION['token']);?>"/>
       <input type="hidden" name="user" value="<?=htmlentities($_GET['user'])?>">
       <label for="code" class="form-label"><?=_('Reset Code');?></label>
-      <input type="text" class="form-control" name="code" id="code" tabindex="1">
+      <input type="text" class="form-control" name="code" id="code">
     </div>
     <div class="u-side-by-side">
-      <input tabindex="2" type="submit" value="<?=_('Confirm');?>" class="button">
-      <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/reset/'">
+      <button type="submit" class="button">
+        <?=_('Confirm');?>
+      </button>
+      <button type="button" class="button button-secondary" onclick="location.href='/reset/'">
+        <?=_('Back');?>
+      </button>
     </div>
   </form>
 </div>

+ 8 - 4
web/templates/pages/login/reset_3.html

@@ -13,15 +13,19 @@
       <input type="hidden" name="user" value="<?=htmlentities($_GET['user']);?>">
       <input type="hidden" name="code" value="<?=htmlentities($_GET['code']);?>">
       <label for="password" class="form-label"><?=_('New Password');?></label>
-      <input type="password" class="form-control" name="password" id="password" tabindex="1">
+      <input type="password" class="form-control" name="password" id="password">
     </div>
     <div class="u-mb20">
       <label for="password_confirm" class="form-label"><?=_('Confirm Password');?></label>
-      <input type="password" class="form-control" name="password_confirm" id="password_confirm" tabindex="2">
+      <input type="password" class="form-control" name="password_confirm" id="password_confirm">
     </div>
     <div class="u-side-by-side">
-      <input tabindex="3" type="submit" value="<?=_('Reset');?>" class="button">
-      <input type="button" class="button button-secondary" value="<?=_('Back');?>" onclick="location.href='/login/'">
+      <button type="submit" class="button">
+        <?=_('Reset');?>
+      </button>
+      <button type="button" class="button button-secondary" onclick="location.href='/login/'">
+        <?=_('Back');?>
+      </button>
     </div>
   </form>
 </div>