diff --git a/guacamole/src/main/webapp/app/form/directives/formField.js b/guacamole/src/main/webapp/app/form/directives/formField.js index 2de0d499e..31be836ba 100644 --- a/guacamole/src/main/webapp/app/form/directives/formField.js +++ b/guacamole/src/main/webapp/app/form/directives/formField.js @@ -96,6 +96,17 @@ angular.module('form').directive('guacFormField', [function formField() { }; + /** + * Returns whether the current field should be displayed. + * + * @returns {Boolean} + * true if the current field should be displayed, false + * otherwise. + */ + $scope.isFieldVisible = function isFieldVisible() { + return fieldContent[0].hasChildNodes(); + }; + // Update field contents when field definition is changed $scope.$watch('field', function setField(field) { diff --git a/guacamole/src/main/webapp/app/form/templates/formField.html b/guacamole/src/main/webapp/app/form/templates/formField.html index f8d330342..45cf6b912 100644 --- a/guacamole/src/main/webapp/app/form/templates/formField.html +++ b/guacamole/src/main/webapp/app/form/templates/formField.html @@ -1,10 +1,9 @@ -