ZeroOmega/omega-web/src/partials/new_profile.jade
2014-10-25 23:41:39 +08:00

58 lines
3.0 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='newProfile.$valid && $close(profile)' name='newProfile')
.modal-header
button.close(type='button' ng-click='$dismiss()')
span(aria-hidden='true') ×
span.sr-only Close
h4.modal-title {{'options_modalHeader_newProfile' | tr}}
.modal-body
.form-group(ng-class='{"has-error": !newProfile.profileNewName.$valid}')
label(for='profile-new-name') {{'options_newProfileName' | tr}}
input#profile-new-name.form-control(type='text' name='profileNewName' required ng-model='profile.name'
ui-validate='validateProfileName' autofocus)
.help-block(ng-show='newProfile.profileNewName.$error.required') {{'options_profileNameEmpty' | tr}}
.help-block(ng-show='newProfile.profileNewName.$error.reserved') {{'options_profileNameReserved' | tr}}
.help-block(ng-show='!newProfile.profileNewName.$error.reserved && newProfile.profileNewName.$error.conflict')
| {{'options_profileNameConflict' | tr}}
.help-block(ng-show='newProfile.profileNewName.$valid && profile.name && isProfileNameHidden(profile.name)')
.text-info
span.glyphicon.glyphicon-info-sign
= ' '
| {{'options_profileNameHidden' | tr}}
label {{'options_profileType' | tr}}
.radio
label
input(type='radio' name='profile-new-type' value='FixedProfile' ng-model='profile.profileType' ng-init='profile.profileType = "FixedProfile"')
span.profile-type
span.glyphicon(ng-class='profileIcons["FixedProfile"]')
= ' '
span {{'options_profileTypeFixedProfile' | tr}}
.help-block {{'options_profileDescFixedProfile' | tr}}
.radio
label
input(type='radio', name='profile-new-type', value='SwitchProfile' ng-model='profile.profileType')
span.profile-type
span.glyphicon(ng-class='profileIcons["SwitchProfile"]')
= ' '
span {{'options_profileTypeSwitchProfile' | tr}}
.help-block {{'options_profileDescSwitchProfile' | tr}}
.radio
label
input(type='radio', name='profile-new-type', value='PacProfile' ng-model='profile.profileType')
span.profile-type
span.glyphicon(ng-class='profileIcons["PacProfile"]')
= ' '
span {{'options_profileTypePacProfile' | tr}}
.help-block {{'options_profileDescPacProfile' | tr}}
.help-block {{'options_profileDescMorePacProfile' | tr}}
.radio
label
input(type='radio', name='profile-new-type', value='VirtualProfile' ng-model='profile.profileType')
span.profile-type
span.glyphicon.virtual-profile-icon(ng-class='profileIcons["VirtualProfile"]')
= ' '
span {{'options_profileTypeVirtualProfile' | tr}}
.help-block {{'options_profileDescVirtualProfile' | tr}}
.modal-footer
button.btn.btn-default(type='button' ng-click='$dismiss()') {{'dialog_cancel' | tr}}
button.btn.btn-primary(type='submit' ng-disabled='!newProfile.$valid') {{'options_createProfile' | tr}}