return !(typeof val === 'undefined' || val === null);
};
+ $scope.toggleLabel = function() {
+ $scope.node.defn = $scope.node.defn || {};
+ if ($scope.node.defn.title === false) {
+ delete $scope.node.defn.title;
+ } else {
+ $scope.node.defn.title = false;
+ }
+ };
+
$scope.toggleRequired = function() {
getSet('required', !getSet('required'));
return false;
{{ ts('Required') }}
</a>
</li>
+<li>
+ <a href ng-click="toggleLabel(); $event.stopPropagation();" title="{{ ts('Show field label') }}">
+ <i class="crm-i" ng-class="{'fa-square-o': node.defn.title === false, 'fa-check-square-o': node.defn.title !== false}"></i>
+ {{ ts('Label') }}
+ </a>
+</li>
<li>
<a href ng-click="toggleHelp('pre'); $event.stopPropagation();" title="{{ ts('Show help text above this field') }}">
<i class="crm-i" ng-class="{'fa-square-o': !propIsset('help_pre'), 'fa-check-square-o': propIsset('help_pre')}"></i>
</div>
</div>
</div>
- <label ng-class="{'af-gui-field-required': getProp('required')}" class="af-gui-node-title">
+ <label ng-style="{visibility: node.defn.title === false ? 'hidden' : 'visible'}" ng-class="{'af-gui-field-required': getProp('required')}" class="af-gui-node-title">
<span af-gui-editable ng-model="node.defn.title" default-value="getDefn().title">{{ getProp('title') }}</span>
</label>
<div class="af-gui-field-help" ng-if="propIsset('help_pre')">