1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-28 10:55:30 +03:00

reorder user and notification template form fields

This commit is contained in:
John Mitchell 2017-03-06 12:29:33 -05:00 committed by Matthew Jones
parent ef87d35901
commit d97ac8cec6
2 changed files with 29 additions and 30 deletions

View File

@ -38,6 +38,17 @@ export default
required: true,
capitalize: true
},
organization: {
label: i18n._('Organization'),
type: 'lookup',
list: 'OrganizationList',
basePath: 'organizations',
sourceModel: 'organization',
sourceField: 'name',
required: true,
excludeMode: 'edit',
ngDisabled: '!(user_obj.summary_fields.user_capabilities.edit || canAdd)'
},
email: {
label: i18n._('Email'),
type: 'email',
@ -55,17 +66,6 @@ export default
autocomplete: false,
ngDisabled: '!(user_obj.summary_fields.user_capabilities.edit || canAdd)'
},
organization: {
label: i18n._('Organization'),
type: 'lookup',
list: 'OrganizationList',
basePath: 'organizations',
sourceModel: 'organization',
sourceField: 'name',
required: true,
excludeMode: 'edit',
ngDisabled: '!(user_obj.summary_fields.user_capabilities.edit || canAdd)'
},
password: {
label: i18n._('Password'),
type: 'sensitive',

View File

@ -70,20 +70,20 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
host: {
label: i18n._('Host'),
type: 'text',
password: {
labelBind: 'passwordLabel',
type: 'sensitive',
hasShowInputButton: true,
awRequiredWhen: {
reqExpression: "email_required",
reqExpression: "password_required" ,
init: "false"
},
ngShow: "notification_type.value == 'email' ",
ngShow: "notification_type.value == 'email' || notification_type.value == 'irc' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
sender: {
label: i18n._('Sender Email'),
host: {
label: i18n._('Host'),
type: 'text',
awRequiredWhen: {
reqExpression: "email_required",
@ -110,15 +110,14 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
password: {
labelBind: 'passwordLabel',
type: 'sensitive',
hasShowInputButton: true,
sender: {
label: i18n._('Sender Email'),
type: 'text',
awRequiredWhen: {
reqExpression: "password_required" ,
reqExpression: "email_required",
init: "false"
},
ngShow: "notification_type.value == 'email' || notification_type.value == 'irc' ",
ngShow: "notification_type.value == 'email' ",
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
@ -269,9 +268,10 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
message_from: {
label: i18n._('Label to be shown with notification'),
api_url: {
label: 'API URL',
type: 'text',
placeholder: 'https://mycompany.hipchat.com',
awRequiredWhen: {
reqExpression: "hipchat_required",
init: "false"
@ -280,10 +280,9 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)'
},
api_url: {
label: 'API URL',
message_from: {
label: i18n._('Notification Label'),
type: 'text',
placeholder: 'https://mycompany.hipchat.com',
awRequiredWhen: {
reqExpression: "hipchat_required",
init: "false"