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, required: true,
capitalize: 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: { email: {
label: i18n._('Email'), label: i18n._('Email'),
type: 'email', type: 'email',
@@ -55,17 +66,6 @@ export default
autocomplete: false, autocomplete: false,
ngDisabled: '!(user_obj.summary_fields.user_capabilities.edit || canAdd)' 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: { password: {
label: i18n._('Password'), label: i18n._('Password'),
type: 'sensitive', type: 'sensitive',

View File

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