-
-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18919 from colemanw/searchKitValidate
Search ext: Fix validation and saving on search admin screen
- Loading branch information
Showing
8 changed files
with
134 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<fieldset> | ||
<div class="form-inline"> | ||
<label for="search_display_label">{{:: ts('Name:') }} <span class="crm-marker">*</span></label> | ||
<input id="search_display_label" type="text" class="form-control" ng-model="$ctrl.display.label" required /> | ||
<label for="crm-search-admin-display-label">{{:: ts('Name:') }} <span class="crm-marker">*</span></label> | ||
<input id="crm-search-admin-display-label" type="text" class="form-control" ng-model="$ctrl.display.label" required placeholder="{{ ts('Untitled') }}"/> | ||
<label class="pull-right">{{:: $ctrl.displayTypes[$ctrl.display.type].label }}</label> | ||
</div> | ||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" 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"> | ||
<label> | ||
<input type="checkbox" checklist-model="$ctrl.savedSearch.groups[0].group_type" checklist-value="option.id"> | ||
{{ option.label }} | ||
</label> | ||
</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"> | ||
<label> | ||
<input type="checkbox" checklist-model="$ctrl.savedSearch.groups[0].group_type" checklist-value="option.id"> | ||
{{ option.label }} | ||
</label> | ||
</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters