Adds autofocus to forms

main
Yasen Pramatarov 2024-09-10 18:29:58 +03:00
parent 59c6706505
commit 1efb3b6a17
7 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@
<span class="text-danger" style="margin-right: -12px;">*</span> <span class="text-danger" style="margin-right: -12px;">*</span>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<input class="form-control" type="text" name="type" value="" required /> <input class="form-control" type="text" name="type" value="" required autofocus />
<p class="text-start"><small>type of agent (meet, jvb, jibri, all)</small></p> <p class="text-start"><small>type of agent (meet, jvb, jibri, all)</small></p>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@
<span class="text-danger" style="margin-right: -12px;">*</span> <span class="text-danger" style="margin-right: -12px;">*</span>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<input class="form-control" type="text" name="type_id" value="<?= htmlspecialchars($agentDetails[0]['type_id'])?>" required /> <input class="form-control" type="text" name="type_id" value="<?= htmlspecialchars($agentDetails[0]['type_id'])?>" required autofocus />
<p class="text-start"><small>type of agent (meet, jvb, jibri, all)</small></p> <p class="text-start"><small>type of agent (meet, jvb, jibri, all)</small></p>
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@
<span class="text-danger" style="margin-right: -12px;">*</span> <span class="text-danger" style="margin-right: -12px;">*</span>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<input class="form-control" type="text" name="name" value="" required /> <input class="form-control" type="text" name="name" value="" required autofocus />
<p class="text-start"><small>descriptive name for the platform</small></p> <p class="text-start"><small>descriptive name for the platform</small></p>
</div> </div>
</div> </div>

View File

@ -15,7 +15,7 @@ foreach ($platformDetails[0] as $key => $value) {
<span class="text-danger" style="margin-right: -12px;">*</span> <span class="text-danger" style="margin-right: -12px;">*</span>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<input class="form-control" type="text" name="<?= htmlspecialchars($key) ?>" value="<?= htmlspecialchars($value ?? '')?>" required /> <input class="form-control" type="text" name="<?= htmlspecialchars($key) ?>" value="<?= htmlspecialchars($value ?? '')?>" required autofocus />
<?php if ($key === 'name') { ?> <?php if ($key === 'name') { ?>
<p class="text-start"><small>descriptive name for the platform</small></p> <p class="text-start"><small>descriptive name for the platform</small></p>
<?php } elseif ($key === 'jitsi_url') { ?> <?php } elseif ($key === 'jitsi_url') { ?>

View File

@ -4,7 +4,7 @@
<div class="card-body"> <div class="card-body">
<p class="card-text"><strong>Welcome to JILO!</strong><br />Please enter login credentials:</p> <p class="card-text"><strong>Welcome to JILO!</strong><br />Please enter login credentials:</p>
<form method="POST" action="<?= $app_root ?>?page=login"> <form method="POST" action="<?= $app_root ?>?page=login">
<input type="text" name="username" placeholder="Username" required /> <input type="text" name="username" placeholder="Username" required autofocus />
<br /> <br />
<input type="password" name="password" placeholder="Password" required /> <input type="password" name="password" placeholder="Password" required />
<br /> <br />

View File

@ -4,7 +4,7 @@
<div class="card-body"> <div class="card-body">
<p class="card-text">Enter credentials for registration:</p> <p class="card-text">Enter credentials for registration:</p>
<form method="POST" action="<?php= $app_root ?>?page=register"> <form method="POST" action="<?php= $app_root ?>?page=register">
<input type="text" name="username" placeholder="Username" required /> <input type="text" name="username" placeholder="Username" required autofocus />
<br /> <br />
<input type="password" name="password" placeholder="Password" required /> <input type="password" name="password" placeholder="Password" required />
<br />&nbsp;<br /> <br />&nbsp;<br />

View File

@ -45,7 +45,7 @@
<label for="name" class="form-label"><small>name:</small></label> <label for="name" class="form-label"><small>name:</small></label>
</div> </div>
<div class="col-md-8 text-start bg-light"> <div class="col-md-8 text-start bg-light">
<input class="form-control" type="text" name="name" value="<?= $userDetails[0]['name'] ?>" /> <input class="form-control" type="text" name="name" value="<?= $userDetails[0]['name'] ?>" autofocus />
</div> </div>
</div> </div>