mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 06:43:44 +08:00
61 lines
1.7 KiB
Handlebars
61 lines
1.7 KiB
Handlebars
<section class='user-preferences solo-preference'>
|
|
<form class="form-horizontal">
|
|
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<h3>{{i18n 'user.change_email.title'}}</h3>
|
|
</div>
|
|
</div>
|
|
|
|
{{#if success}}
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div class="instructions">
|
|
<p>
|
|
{{#if model.staff}}
|
|
{{i18n 'user.change_email.success_staff'}}
|
|
{{else}}
|
|
{{i18n 'user.change_email.success'}}
|
|
{{/if}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
{{#if error}}
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
<div class='alert alert-error'>{{errorMessage}}</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="control-group">
|
|
<label class="control-label">{{i18n 'user.email.title'}}</label>
|
|
<div class="controls">
|
|
{{text-field value=newEmail id="change-email" classNames="input-xxlarge" autofocus="autofocus"}}
|
|
{{input-tip validation=emailValidation}}
|
|
</div>
|
|
<div class="controls">
|
|
<div class='instructions'>
|
|
{{#if taken}}
|
|
{{i18n 'user.change_email.taken'}}
|
|
{{else}}
|
|
{{i18n 'user.email.instructions'}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
<div class="controls">
|
|
{{#d-button class="btn btn-primary" action=(action "changeEmail") disabled=saveDisabled}}
|
|
{{saveButtonText}}
|
|
{{/d-button}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
</form>
|
|
</section>
|