CLEANUP: removed all unused handlebars helpers REFACTOR: removed 'unbound' prefix (for performance reasons, helpers are unbound by default) REFACTOR: added 'bound' prefix to bound helpers REFACTOR: renamed helper using 'foo-bar-foo' syntax (instead of camel case)
43 lines
2.1 KiB
Handlebars
43 lines
2.1 KiB
Handlebars
<div class="modal-body">
|
|
<div>
|
|
<div>
|
|
<input type="radio" id="system-avatar" name="avatar" value="system" {{action useSystem}}>
|
|
<label class="radio" for="system-avatar">{{bound-avatar controller "large" system_avatar_upload_id}} {{{i18n user.change_avatar.letter_based}}}</label>
|
|
</div>
|
|
<div>
|
|
<input type="radio" id="gravatar" name="avatar" value="gravatar" {{action useGravatar}}>
|
|
<label class="radio" for="gravatar">{{bound-avatar controller "large" gravatar_avatar_upload_id}} {{{i18n user.change_avatar.gravatar}}} {{email}}</label>
|
|
<button href="#" {{action refreshGravatar}} title="{{i18n user.change_avatar.refresh_gravatar_title}}" {{bind-attr enabled="view.gravatarRefreshEnabled"}} class="btn no-text"><i class="fa fa-refresh"></i></button>
|
|
</div>
|
|
<div>
|
|
<input type="radio" id="uploaded_avatar" name="avatar" value="uploaded" {{action useUploadedAvatar}}>
|
|
<label class="radio" for="uploaded_avatar">
|
|
{{#if view.hasUploadedAvatar}}
|
|
{{#if view.uploadedAvatarTemplate}}
|
|
{{bound-avatar-template view.uploadedAvatarTemplate "large"}}
|
|
{{else}}
|
|
{{bound-avatar controller "large" custom_avatar_upload_id}} {{i18n user.change_avatar.uploaded_avatar}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{i18n user.change_avatar.uploaded_avatar_empty}}
|
|
{{/if}}
|
|
</label>
|
|
<button id="fake-avatar-input" class="btn" {{bind-attr disabled="view.uploading"}} title="{{i18n user.change_avatar.upload_title}}">
|
|
<i class="fa fa-picture-o"></i> {{view.uploadButtonText}}
|
|
</button>
|
|
<input type="file" id="avatar-input" accept="image/*" style="display:none">
|
|
{{#if view.uploading}}
|
|
<span>{{i18n upload_selector.uploading}} {{view.uploadProgress}}%</span>
|
|
{{/if}}
|
|
{{#if view.imageIsNotASquare}}
|
|
<div class="warning">{{i18n user.change_avatar.image_is_not_a_square}}</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button class="btn btn-primary" {{action saveAvatarSelection}} {{bind-attr disabled="view.saveDisabled"}}>{{i18n save}}</button>
|
|
<a {{action closeModal}}>{{i18n cancel}}</a>
|
|
</div>
|