diff --git a/guacamole/src/main/webapp/app/form/directives/form.js b/guacamole/src/main/webapp/app/form/directives/form.js index 518db7dba..be2f3b176 100644 --- a/guacamole/src/main/webapp/app/form/directives/form.js +++ b/guacamole/src/main/webapp/app/form/directives/form.js @@ -64,7 +64,15 @@ angular.module('form').directive('guacForm', [function form() { * * @type Boolean */ - modelOnly : '=' + modelOnly : '=', + + /** + * Whether the contents of the form should be rendered as disabled. + * By default, form fields are enabled. + * + * @type Boolean + */ + disabled : '=' }, templateUrl: 'app/form/templates/form.html', diff --git a/guacamole/src/main/webapp/app/form/directives/formField.js b/guacamole/src/main/webapp/app/form/directives/formField.js index ea0f35fd7..15adc29e4 100644 --- a/guacamole/src/main/webapp/app/form/directives/formField.js +++ b/guacamole/src/main/webapp/app/form/directives/formField.js @@ -53,7 +53,15 @@ angular.module('form').directive('guacFormField', [function formField() { * * @type String */ - model : '=' + model : '=', + + /** + * Whether this field should be rendered as disabled. By default, + * form fields are enabled. + * + * @type Boolean + */ + disabled : '=' }, templateUrl: 'app/form/templates/formField.html', diff --git a/guacamole/src/main/webapp/app/form/services/formService.js b/guacamole/src/main/webapp/app/form/services/formService.js index 168a1efa7..21bfb4742 100644 --- a/guacamole/src/main/webapp/app/form/services/formService.js +++ b/guacamole/src/main/webapp/app/form/services/formService.js @@ -213,6 +213,10 @@ angular.module('form').provider('formService', function formServiceProvider() { * model: * The current String value of the field, if any. * + * disabled: + * A boolean value which is true if the field should be disabled. + * If false or undefined, the field should be enabled. + * * @param {Element} fieldContainer * The DOM Element whose contents should be replaced with the * compiled field template. diff --git a/guacamole/src/main/webapp/app/form/templates/checkboxField.html b/guacamole/src/main/webapp/app/form/templates/checkboxField.html index ad9d8e006..b76368afe 100644 --- a/guacamole/src/main/webapp/app/form/templates/checkboxField.html +++ b/guacamole/src/main/webapp/app/form/templates/checkboxField.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/guacamole/src/main/webapp/app/form/templates/dateField.html b/guacamole/src/main/webapp/app/form/templates/dateField.html index a186e19a5..b6af5463c 100644 --- a/guacamole/src/main/webapp/app/form/templates/dateField.html +++ b/guacamole/src/main/webapp/app/form/templates/dateField.html @@ -1,5 +1,6 @@