Improve spacing of registration form, and add instructions to the password field.
This commit is contained in:
parent
2326d4ceb7
commit
7fb985a02e
|
@ -30,6 +30,10 @@ Discourse.CreateAccountController = Discourse.Controller.extend(Discourse.ModalF
|
||||||
return this.blank('authOptions.auth_provider');
|
return this.blank('authOptions.auth_provider');
|
||||||
}.property('authOptions.auth_provider'),
|
}.property('authOptions.auth_provider'),
|
||||||
|
|
||||||
|
passwordInstructions: function() {
|
||||||
|
return I18n.t('user.password.instructions', {count: 6}); // TODO: soon to be configurable
|
||||||
|
}.property(),
|
||||||
|
|
||||||
// Validate the name
|
// Validate the name
|
||||||
nameValidation: function() {
|
nameValidation: function() {
|
||||||
|
|
||||||
|
|
|
@ -3,50 +3,54 @@
|
||||||
<div>
|
<div>
|
||||||
<form>
|
<form>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr class="input">
|
||||||
<td style="width:80px"><label for='new-account-name'>{{i18n user.name.title}}</label></td>
|
<td style="width:80px"><label for='new-account-name'>{{i18n user.name.title}}</label></td>
|
||||||
<td style="width:496px">
|
<td style="width:496px">
|
||||||
{{textField value=accountName id="new-account-name" autofocus="autofocus"}}
|
{{textField value=accountName id="new-account-name" autofocus="autofocus"}}
|
||||||
{{inputTip validation=nameValidation}}
|
{{inputTip validation=nameValidation}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n user.name.instructions}}</label></td>
|
<td><label>{{i18n user.name.instructions}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr class="input">
|
||||||
<td><label for='new-account-email'>{{i18n user.email.title}}</label></td>
|
<td><label for='new-account-email'>{{i18n user.email.title}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{input value=accountEmail id="new-account-email"}}
|
{{input value=accountEmail id="new-account-email"}}
|
||||||
{{inputTip validation=emailValidation}}
|
{{inputTip validation=emailValidation}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n user.email.instructions}}</label></td>
|
<td><label>{{i18n user.email.instructions}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr class="input">
|
||||||
<td><label for='new-account-username'>{{i18n user.username.title}}</label></td>
|
<td><label for='new-account-username'>{{i18n user.username.title}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{input value=accountUsername id="new-account-username" maxlength="15"}}
|
{{input value=accountUsername id="new-account-username" maxlength="15"}}
|
||||||
{{inputTip validation=usernameValidation}}
|
{{inputTip validation=usernameValidation}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="instructions">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><label>{{i18n user.username.instructions}}</label></td>
|
<td><label>{{i18n user.username.instructions}}</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{{#if passwordRequired}}
|
{{#if passwordRequired}}
|
||||||
<tr>
|
<tr class="input">
|
||||||
<td><label for='new-account-password'>{{i18n user.password.title}}</label></td>
|
<td><label for='new-account-password'>{{i18n user.password.title}}</label></td>
|
||||||
<td>
|
<td>
|
||||||
{{input type="password" value=accountPassword id="new-account-password"}}
|
{{input type="password" value=accountPassword id="new-account-password"}}
|
||||||
{{inputTip validation=passwordValidation}}
|
{{inputTip validation=passwordValidation}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="instructions">
|
||||||
|
<td></td>
|
||||||
|
<td><label>{{passwordInstructions}}</label></td>
|
||||||
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<tr class="password-confirmation">
|
<tr class="password-confirmation">
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
Discourse.CreateAccountView = Discourse.ModalBodyView.extend({
|
Discourse.CreateAccountView = Discourse.ModalBodyView.extend({
|
||||||
templateName: 'modal/create_account',
|
templateName: 'modal/create_account',
|
||||||
title: I18n.t('create_account.title'),
|
title: I18n.t('create_account.title'),
|
||||||
|
classNames: ['create-account'],
|
||||||
|
|
||||||
didInsertElement: function(e) {
|
didInsertElement: function(e) {
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,21 @@
|
||||||
|
|
||||||
#new-account-link {
|
#new-account-link {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.create-account {
|
||||||
|
tr.input {
|
||||||
|
td {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
input, label {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.instructions {
|
||||||
|
label {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -351,6 +351,7 @@ en:
|
||||||
title: "Password"
|
title: "Password"
|
||||||
too_short: "Your password is too short."
|
too_short: "Your password is too short."
|
||||||
ok: "Your password looks good."
|
ok: "Your password looks good."
|
||||||
|
instructions: "Must be at least %{count} characters."
|
||||||
|
|
||||||
ip_address:
|
ip_address:
|
||||||
title: "Last IP Address"
|
title: "Last IP Address"
|
||||||
|
|
Loading…
Reference in New Issue