mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-204: Do not display field headers, etc. if the field itself has no content whatsoever.
This commit is contained in:
		| @@ -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) { | ||||
|  | ||||
|   | ||||
| @@ -1,10 +1,9 @@ | ||||
| <label class="labeled-field" ng-class="{empty: !model}"> | ||||
| <label class="labeled-field" ng-class="{empty: !model}" ng-show="isFieldVisible()"> | ||||
|  | ||||
|     <!-- Field header --> | ||||
|     <span class="field-header">{{getFieldHeader() | translate}}</span> | ||||
|  | ||||
|     <!-- Field content --> | ||||
|     <div class="form-field"> | ||||
|     </div> | ||||
|     <div class="form-field"></div> | ||||
|  | ||||
| </label> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user