Add an explicit alias for sql functions
[civicrm-core.git] / ext / search / ang / crmSearchAdmin / group.html
index 8eb14919c3157e04b18395f8ee36e668c3177ee8..64bf4a30c4d4706a88f663d6d5c37b8d8dca2163 100644 (file)
@@ -1,33 +1,27 @@
-<div ng-if="!$ctrl.groupExists">
-  <div class="alert alert-warning">
-    {{:: ts('Smart group "%1" will be deleted.', {1: $ctrl.savedSearch.groups[0].title}) }}
-  </div>
+<div class="alert alert-warning" ng-show="!smartGroupColumns.length">
+  {{:: ts('Unable to create smart group because this search does not include any contacts.') }}
+</div>
+
+<div class="form-inline">
+  <label for="crm-search-admin-group-title">{{ ts('Group Title:') }} <span class="crm-marker">*</span></label>
+  <input id="crm-search-admin-group-title" class="form-control" placeholder="{{:: ts('Untitled') }}" ng-model="$ctrl.savedSearch.groups[0].title" ng-disabled="!smartGroupColumns.length" ng-required="smartGroupColumns.length">
+  <label for="api-save-search-select-column">{{:: ts('Contact Column:') }}</label>
+  <input id="api-save-search-select-column" ng-model="$ctrl.savedSearch.api_params.select[0]" class="form-control huge" crm-ui-select="{data: smartGroupColumns}"/>
 </div>
-<div ng-if="$ctrl.groupExists">
-  <div class="alert alert-warning" ng-show="!smartGroupColumns.length">
-    {{:: ts('Unable to create smart group because this search does not include any contacts.') }}
+<fieldset ng-show="smartGroupColumns.length">
+  <label>{{:: ts('Description:') }}</label>
+  <textarea class="form-control" ng-model="$ctrl.savedSearch.groups[0].description"></textarea>
+  <div class="form-inline">
+    <label>{{:: ts('Group Type:') }} </label>
+    <div class="checkbox" ng-repeat="option in groupOptions.group_type track by option.id">&nbsp;
+      <label>
+        <input type="checkbox" checklist-model="$ctrl.savedSearch.groups[0].group_type" checklist-value="option.id">
+        {{ option.label }}
+      </label>&nbsp;
+    </div>
   </div>
-  <input class="form-control" placeholder="{{:: ts('Group Title') }}" ng-model="$ctrl.savedSearch.groups[0].title" ng-disabled="!smartGroupColumns.length">
-  <hr />
   <div class="form-inline">
-   <label for="api-save-search-select-column">{{:: ts('Contact Column:') }} <span class="crm-marker">*</span></label>
-    <input id="api-save-search-select-column" ng-model="$ctrl.savedSearch.api_params.select[0]" class="form-control" crm-ui-select="{data: smartGroupColumns}"/>
+    <label>{{:: ts('Visibility:') }}</label>
+    <select class="form-control" ng-model="$ctrl.savedSearch.groups[0].visibility" ng-options="item.id as item.label for item in groupOptions.visibility track by item.id" crm-ui-select></select>
   </div>
-  <fieldset ng-show="smartGroupColumns.length">
-    <label>{{:: ts('Description:') }}</label>
-    <textarea class="form-control" ng-model="$ctrl.savedSearch.groups[0].description"></textarea>
-    <div class="form-inline">
-      <label>{{:: ts('Group Type:') }} </label>
-      <div class="checkbox" ng-repeat="option in groupOptions.group_type track by option.id">&nbsp;
-        <label>
-          <input type="checkbox" checklist-model="$ctrl.savedSearch.groups[0].group_type" checklist-value="option.id">
-          {{ option.label }}
-        </label>&nbsp;
-      </div>
-    </div>
-    <div class="form-inline">
-      <label>{{:: ts('Visibility:') }}</label>
-      <select class="form-control" ng-model="$ctrl.savedSearch.groups[0].visibility" ng-options="item.id as item.label for item in groupOptions.visibility track by item.id" crm-ui-select></select>
-    </div>
-  </fieldset>
-</div>
+</fieldset>