mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:04:03 +08:00
Autofocus on first field in signup form
This commit is contained in:
parent
21b5183d6a
commit
7777b3f650
|
@ -6,7 +6,7 @@
|
|||
<tr>
|
||||
<td style="width:80px"><label for='new-account-name'>{{i18n user.name.title}}</label></td>
|
||||
<td style="width:496px">
|
||||
{{view Ember.TextField valueBinding="view.accountName" elementId="new-account-name"}}
|
||||
{{view Discourse.TextField valueBinding="view.accountName" elementId="new-account-name" autofocus="autofocus"}}
|
||||
{{view Discourse.InputTipView validationBinding="view.nameValidation"}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -10,7 +10,11 @@ Discourse.TextField = Ember.TextField.extend({
|
|||
attributeBindings: ['autocorrect', 'autocapitalize', 'autofocus'],
|
||||
|
||||
placeholder: (function() {
|
||||
return Em.String.i18n(this.get('placeholderKey'));
|
||||
if( this.get('placeholderKey') ) {
|
||||
return Em.String.i18n(this.get('placeholderKey'));
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}).property('placeholderKey')
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user