fix spinner and radio read only fields

This commit is contained in:
John Mitchell
2017-01-31 15:35:58 -05:00
parent a544e322fd
commit b6f645a72b
4 changed files with 4 additions and 1 deletions

View File

@@ -305,6 +305,7 @@ export default
label: "Cache Timeout <span class=\"small-text\"> (seconds)</span>",
id: 'source-cache-timeout',
type: 'number',
ngDisabled: '!(group_obj.summary_fields.user_capabilities.edit || canAdd)',
integer: true,
min: 0,
ngShow: "source && source.value !== '' && update_on_launch",

View File

@@ -214,7 +214,7 @@ export default
dataTitle: i18n._('Forks'),
dataPlacement: 'right',
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: {
label: i18n._('Limit'),

View File

@@ -397,6 +397,7 @@ export default ['i18n', function(i18n) {
subForm: 'typeSubForm',
ngShow: "notification_type.value == 'email'",
ngChange: "emailOptionsChange()",
ngDisabled: '!(notification_template.summary_fields.user_capabilities.edit || canAdd)',
options: [{
value: 'use_tls',
label: i18n._('Use TLS'),

View File

@@ -1279,6 +1279,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += "value=\"" + field.options[i].value + "\" ";
html += "ng-model=\"" + fld + "\" ";
html += (field.ngChange) ? this.attr(field, 'ngChange') : "";
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}"` : "";
html += (field.readonly) ? "disabled " : "";
html += (field.required) ? "required " : "";
html += (field.ngshow) ? "ng-show=\"" + field.ngShow + "\" " : "";