Skip to content

Commit ac5ee20

Browse files
feat: add autofocus attributes to major forms
1 parent a91162a commit ac5ee20

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

html-templates/login/login.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</div>
1212

1313
<form method="POST" id="login">
14-
14+
1515
{if $authException || $error}
1616
<div class="well well-sm">
1717
<h2>{_ "There were problems with your submission:"}</h2>
@@ -29,7 +29,7 @@
2929
{strip}
3030
<div class="form-group">
3131
<label for="_LOGIN[username]" class="control-label">{_ "Username"}</label>
32-
<input type="text" class="form-control" placeholder="{_ 'Username or email address'}" name="_LOGIN[username]" value="{refill field=_LOGIN.username}" autocorrect="off" autocapitalize="off">
32+
<input type="text" class="form-control" placeholder="{_ 'Username or email address'}" name="_LOGIN[username]" value="{refill field=_LOGIN.username}" autocorrect="off" autocapitalize="off" autofocus>
3333
</div>
3434

3535
<div class="form-group">
@@ -46,7 +46,7 @@
4646

4747
<p>{sprintf(_('You can %s, or %s now.'), $recoverLink, $registerLink)}</p>
4848
{/strip}
49-
49+
5050
{foreach item=value key=name from=$postVars}
5151
{if is_array($value)}
5252
{foreach item=subvalue key=subkey from=$value}

html-templates/project-buzz/projectBuzzEdit.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</div>
3535
<div class="form-group">
3636
<label for="field-headline" class="control-label">Headline:</label>
37-
<input name="Headline" id="field-headline" placeholder="City Times headline on Budget Project" value="{refill field=Headline default=$Buzz->Headline}" class="form-control" aria-required="true" required>
37+
<input name="Headline" id="field-headline" placeholder="City Times headline on Budget Project" value="{refill field=Headline default=$Buzz->Headline}" class="form-control" aria-required="true" required autofocus>
3838
</div>
3939
<div class="form-group">
4040
<label for="field-url" class="control-label">URL:</label>

html-templates/project-updates/projectUpdateEdit.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="control-group">
3131
<label for="UpdateBody" class="control-label">Update</label>
3232
<div class="controls">
33-
<textarea name="Body" class="input-block-level" rows="10" id="UpdateBody">{refill field=Body default=$Update->Body}</textarea>
33+
<textarea name="Body" class="input-block-level" rows="10" id="UpdateBody" autofocus>{refill field=Body default=$Update->Body}</textarea>
3434
<br/><br/>
3535
<input type="submit" class="btn-sm btn btn-secondary" value="{tif $Update->isPhantom ? 'Post Update' : 'Save Changes'}"/>
3636
</div>

html-templates/projects/projectEdit.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<form method="POST">
4242
<div class="form-group">
4343
<label for="field-title">{_ "Title"}:</label>
44-
<input name="Title" id="field-title" class="form-control" placeholder="{_ 'Train Schedule Analyzer'}" value="{refill field=Title default=$Project->Title}" />
44+
<input name="Title" id="field-title" class="form-control" placeholder="{_ 'Train Schedule Analyzer'}" value="{refill field=Title default=$Project->Title}" autofocus />
4545
</div>
4646
<div class="form-group">
4747
<label for="field-url-users">{_ "URL for Users"}:</label>

html-templates/register/register.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<div class="form-group">
3838
<label class="control-label" for="FirstName">{_ "First Name"}</label>
39-
<input type="text" class="form-control" id="FirstName" name="FirstName" value="{refill field=FirstName}" placeholder="{_ 'Jill'}">
39+
<input type="text" class="form-control" id="FirstName" name="FirstName" value="{refill field=FirstName}" placeholder="{_ 'Jill'}" autofocus>
4040
</div>
4141

4242
<div class="form-group">

0 commit comments

Comments
 (0)