mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
Merge pull request #5089 from jlmitch5/fixFieldReadonlys
Fix field readonlys
This commit is contained in:
@@ -305,6 +305,7 @@ export default
|
|||||||
label: "Cache Timeout <span class=\"small-text\"> (seconds)</span>",
|
label: "Cache Timeout <span class=\"small-text\"> (seconds)</span>",
|
||||||
id: 'source-cache-timeout',
|
id: 'source-cache-timeout',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
integer: true,
|
integer: true,
|
||||||
min: 0,
|
min: 0,
|
||||||
ngShow: "source && source.value !== '' && update_on_launch",
|
ngShow: "source && source.value !== '' && update_on_launch",
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ export default
|
|||||||
dataTitle: i18n._('Forks'),
|
dataTitle: i18n._('Forks'),
|
||||||
dataPlacement: 'right',
|
dataPlacement: 'right',
|
||||||
dataContainer: "body",
|
dataContainer: "body",
|
||||||
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)' // TODO: get working
|
ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)'
|
||||||
},
|
},
|
||||||
limit: {
|
limit: {
|
||||||
label: i18n._('Limit'),
|
label: i18n._('Limit'),
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export default
|
|||||||
},
|
},
|
||||||
view: {
|
view: {
|
||||||
label: i18n._('View'),
|
label: i18n._('View'),
|
||||||
ngClick: "editJobTemplate(template.id)",
|
ngClick: "editJobTemplate(template)",
|
||||||
awToolTip: i18n._('View template'),
|
awToolTip: i18n._('View template'),
|
||||||
"class": 'btn-default btn-xs',
|
"class": 'btn-default btn-xs',
|
||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
|
|||||||
@@ -397,6 +397,7 @@ export default ['i18n', function(i18n) {
|
|||||||
subForm: 'typeSubForm',
|
subForm: 'typeSubForm',
|
||||||
ngShow: "notification_type.value == 'email'",
|
ngShow: "notification_type.value == 'email'",
|
||||||
ngChange: "emailOptionsChange()",
|
ngChange: "emailOptionsChange()",
|
||||||
|
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)',
|
||||||
options: [{
|
options: [{
|
||||||
value: 'use_tls',
|
value: 'use_tls',
|
||||||
label: i18n._('Use TLS'),
|
label: i18n._('Use TLS'),
|
||||||
|
|||||||
@@ -1280,6 +1280,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
|
|||||||
html += "value=\"" + field.options[i].value + "\" ";
|
html += "value=\"" + field.options[i].value + "\" ";
|
||||||
html += "ng-model=\"" + fld + "\" ";
|
html += "ng-model=\"" + fld + "\" ";
|
||||||
html += (field.ngChange) ? this.attr(field, 'ngChange') : "";
|
html += (field.ngChange) ? this.attr(field, 'ngChange') : "";
|
||||||
|
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}"` : "";
|
||||||
html += (field.readonly) ? "disabled " : "";
|
html += (field.readonly) ? "disabled " : "";
|
||||||
html += (field.required) ? "required " : "";
|
html += (field.required) ? "required " : "";
|
||||||
html += (field.ngshow) ? "ng-show=\"" + field.ngShow + "\" " : "";
|
html += (field.ngshow) ? "ng-show=\"" + field.ngShow + "\" " : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user