ZeroOmega/omega-web/src/partials/rename_profile.jade
FelisCatus 658764db10 Improve UI for reserved and hidden profiles. Fix #43.
Prevent users from creating reserved profiles.
Show help on hidden profiles.

Also, avoid creating profile beginning with underscore on upgrade.
2014-10-12 14:47:47 +08:00

24 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

form(ng-submit='renameProfile.$valid && $close(newName)' name='renameProfile')
.modal-header
button.close(type='button' ng-click='$dismiss()')
span(aria-hidden='true') ×
span.sr-only {{'dialog_close' | tr}}
h4.modal-title {{'options_modalHeader_renameProfile' | tr}}
.modal-body
.form-group(ng-class='{"has-error": !renameProfile.profileNewName.$valid}')
label(for='profile-new-name') {{'options_renameProfileName' | tr}}
input#profile-new-name.form-control(type='text' name='profileNewName' required ng-model='newName'
ui-validate='validateProfileName' ng-init='newName = fromName')
.help-block(ng-show='renameProfile.profileNewName.$error.required') {{'options_profileNameEmpty' | tr}}
.help-block(ng-show='renameProfile.profileNewName.$error.reserved') {{'options_profileNameReserved' | tr}}
.help-block(ng-show='!renameProfile.profileNewName.$error.reserved && renameProfile.profileNewName.$error.conflict')
| {{'options_profileNameConflict' | tr}}
.help-block(ng-show='renameProfile.profileNewName.$valid && newName && isProfileNameHidden(newName)')
.text-info
span.glyphicon.glyphicon-info-sign
= ' '
| {{'options_profileNameHidden' | tr}}
.modal-footer
button.btn.btn-default(type='button' ng-click='$dismiss()') {{'dialog_cancel' | tr}}
button.btn.btn-primary(type='submit' ng-disabled='!renameProfile.$valid') {{'options_renameProfile' | tr}}