-
-
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 #22653 from colemanw/searchKitOperatorFixes
SearchKit - Fix selecting operators and values in clauses
- Loading branch information
Showing
9 changed files
with
48 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<select class="form-control api4-operator" ng-model="$ctrl.clause[$ctrl.offset]" ng-options="o.key as o.value for o in $ctrl.getOperators()" ng-change="$ctrl.changeClauseOperator()" ></select> | ||
<crm-search-input ng-if="$ctrl.operatorTakesInput()" ng-model="$ctrl.clause[$ctrl.offset + 1]" field="$ctrl.field" option-key="$ctrl.optionKey" op="$ctrl.clause[$ctrl.offset]" format="$ctrl.format" class="form-group"></crm-search-input> | ||
<select class="form-control api4-operator" ng-model="$ctrl.getSetOperator" ng-model-options="{getterSetter: true}" ng-options="o.key as o.value for o in $ctrl.getOperators()" ng-change="$ctrl.changeClauseOperator()" ></select> | ||
<crm-search-input ng-if="$ctrl.operatorTakesInput()" ng-model="$ctrl.getSetValue" ng-model-options="{getterSetter: true}" field="$ctrl.field" option-key="$ctrl.optionKey" op="$ctrl.getSetOperator()" format="$ctrl.format" class="form-group"></crm-search-input> |
4 changes: 2 additions & 2 deletions
4
ext/search_kit/ang/crmSearchTasks/crmSearchInput/boolean.html
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,8 +1,8 @@ | ||
<div class="form-group" ng-if="!$ctrl.multi" > | ||
<div class="form-group" ng-if="!$ctrl.isMulti()" > | ||
<label class="radio-inline"><input type="radio" ng-value="true" ng-model="$ctrl.value"> {{:: ts('Yes') }}</label> | ||
<label class="radio-inline"><input type="radio" ng-value="false" ng-model="$ctrl.value"> {{:: ts('No') }}</label> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi" > | ||
<div class="form-group" ng-if="$ctrl.isMulti()" > | ||
<label class="checkbox-inline"><input type="checkbox" checklist-value="true" checklist-model="$ctrl.value"> {{:: ts('Yes') }}</label> | ||
<label class="checkbox-inline"><input type="checkbox" checklist-value="false" checklist-model="$ctrl.value"> {{:: ts('No') }}</label> | ||
</div> |
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
4 changes: 2 additions & 2 deletions
4
ext/search_kit/ang/crmSearchTasks/crmSearchInput/entityRef.html
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,6 +1,6 @@ | ||
<div class="form-group" ng-if="!$ctrl.multi"> | ||
<div class="form-group" ng-if="!$ctrl.isMulti()"> | ||
<input class="form-control" ng-model="$ctrl.value" crm-entityref="{entity: $ctrl.entity, select:{allowClear: true, placeholder: ts('Select')}, static: $ctrl.entity === 'Contact' ? ['user_contact_id'] : []}"> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi"> | ||
<div class="form-group" ng-if="$ctrl.isMulti()"> | ||
<input class="form-control" ng-model="$ctrl.value" crm-entityref="{entity: $ctrl.entity, select: {multiple: true}, static: $ctrl.entity === 'Contact' ? ['user_contact_id'] : []}" ng-list > | ||
</div> |
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,6 +1,6 @@ | ||
<div class="form-group" ng-if="!$ctrl.multi" > | ||
<div class="form-group" ng-if="!$ctrl.isMulti()" > | ||
<input type="number" step="any" class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable"> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi" > | ||
<div class="form-group" ng-if="$ctrl.isMulti()" > | ||
<input class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable" crm-ui-select="{multiple: true, tags: [], tokenSeparators: [','], formatNoMatches: ''}" ng-list> | ||
</div> |
4 changes: 2 additions & 2 deletions
4
ext/search_kit/ang/crmSearchTasks/crmSearchInput/integer.html
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,6 +1,6 @@ | ||
<div class="form-group" ng-if="!$ctrl.multi" > | ||
<div class="form-group" ng-if="!$ctrl.isMulti()" > | ||
<input type="number" step="1" class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable"> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi" > | ||
<div class="form-group" ng-if="$ctrl.isMulti()" > | ||
<input class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable" crm-ui-select="{multiple: true, tags: [], tokenSeparators: [','], formatNoMatches: ''}" ng-list> | ||
</div> |
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,9 +1,9 @@ | ||
<div class="form-group" ng-if="$ctrl.field.options === true"> | ||
<input disabled class="form-control loading" crm-ui-select="{data: []}"> | ||
</div> | ||
<div class="form-group" ng-if="!$ctrl.multi && $ctrl.field.options !== true"> | ||
<div class="form-group" ng-if="!$ctrl.isMulti() && $ctrl.field.options !== true"> | ||
<input class="form-control" ng-model="$ctrl.value" crm-ui-select="{data: $ctrl.getFieldOptions, allowClear: $ctrl.field.nullable, placeholder: $ctrl.field.nullable ? ts('None') : ts('Select')}"> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi && $ctrl.field.options !== true"> | ||
<div class="form-group" ng-if="$ctrl.isMulti() && $ctrl.field.options !== true"> | ||
<input class="form-control" ng-model="$ctrl.value" crm-ui-select="{data: $ctrl.getFieldOptions, multiple: true}" ng-list > | ||
</div> |
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,6 +1,6 @@ | ||
<div class="form-group" ng-if="!$ctrl.multi" > | ||
<div class="form-group" ng-if="!$ctrl.isMulti()" > | ||
<input type="text" class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable"> | ||
</div> | ||
<div class="form-group" ng-if="$ctrl.multi" > | ||
<div class="form-group" ng-if="$ctrl.isMulti()" > | ||
<input class="form-control" ng-model="$ctrl.value" ng-required="!$ctrl.field.nullable" crm-ui-select="{multiple: true, tags: [], tokenSeparators: [','], formatNoMatches: ''}" ng-list> | ||
</div> |