Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchKit - Don't save on enter key #19643

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/search/ang/crmSearchAdmin/compose/controls.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<hr>
<div class="form-inline">
<div class="btn-group" role="group">
<button class="btn btn-primary{{ $ctrl.autoSearch ? '-outline' : '' }}" ng-click="onClickSearch()" ng-disabled="loading || (!$ctrl.autoSearch && !$ctrl.stale)">
<button type="button" class="btn btn-primary{{ $ctrl.autoSearch ? '-outline' : '' }}" ng-click="onClickSearch()" ng-disabled="loading || (!$ctrl.autoSearch && !$ctrl.stale)">
<i class="crm-i {{ loading ? 'fa-spin fa-spinner' : 'fa-search' }}"></i>
{{:: ts('Search') }}
</button>
<button class="btn crm-search-auto-toggle btn-primary{{ $ctrl.autoSearch ? '' : '-outline' }}" ng-click="onClickAuto()">
<button type="button" class="btn crm-search-auto-toggle btn-primary{{ $ctrl.autoSearch ? '' : '-outline' }}" ng-click="onClickAuto()">
<i class="crm-i fa-toggle-{{ $ctrl.autoSearch ? 'on' : 'off' }}"></i>
{{:: ts('Auto') }}
</button>
Expand Down
2 changes: 1 addition & 1 deletion ext/search/ang/crmSearchAdmin/compose/criteria.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<label for="crm-search-join-{{ $index }}">{{:: ts('With') }}</label>
<input id="crm-search-join-{{ $index }}" class="form-control huge" ng-model="join[0]" crm-ui-select="{placeholder: ' ', data: getJoinEntities}" disabled >
<select class="form-control" ng-model="join[1]" ng-options="o.k as o.v for o in ::joinTypes" ></select>
<button class="btn btn-xs btn-danger-outline" ng-click="$ctrl.removeJoin($index)" title="{{:: ts('Remove join') }}">
<button type="button" class="btn btn-xs btn-danger-outline" ng-click="$ctrl.removeJoin($index)" title="{{:: ts('Remove join') }}">
<i class="crm-i fa-trash" aria-hidden="true"></i>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ext/search/ang/crmSearchAdmin/crmSearchAdmin.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1 crm-page-title>{{ $ctrl.entityTitle + ': ' + $ctrl.savedSearch.label }}</h1>
<label for="crm-search-main-entity">{{:: ts('Search for:') }}</label>
<input id="crm-search-main-entity" class="form-control huge" ng-model="$ctrl.savedSearch.api_entity" crm-ui-select="::{allowClear: false, data: entities}" ng-disabled="$ctrl.savedSearch.id" />
<div class="btn-group btn-group-md pull-right">
<button type="submit" class="btn" ng-class="{'btn-primary': status === 'unsaved', 'btn-warning': status === 'saving', 'btn-success': status === 'saved'}" ng-disabled="status !== 'unsaved'" ng-click="$ctrl.save()">
<button type="button" class="btn" ng-class="{'btn-primary': status === 'unsaved', 'btn-warning': status === 'saving', 'btn-success': status === 'saved'}" ng-disabled="status !== 'unsaved'" ng-click="$ctrl.save()">
<i class="crm-i" ng-class="{'fa-check': status !== 'saving', 'fa-spin fa-spinner': status === 'saving'}"></i>
<span ng-if="status === 'saved'">{{ ts('Saved') }}</span>
<span ng-if="status === 'unsaved'">{{ ts('Save') }}</span>
Expand Down
2 changes: 1 addition & 1 deletion ext/search/ang/crmSearchAdmin/crmSearchClause.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<legend>{{ $ctrl.label || ts('%1 group', {1: $ctrl.conjunctions[$ctrl.op]}) }}</legend>
<div class="btn-group btn-group-xs" ng-if=":: $ctrl.hasParent">
<button class="btn btn-danger-outline" ng-click="$ctrl.deleteGroup()" title="{{:: ts('Remove group') }}">
<button type="button" class="btn btn-danger-outline" ng-click="$ctrl.deleteGroup()" title="{{:: ts('Remove group') }}">
<i class="crm-i fa-trash" aria-hidden="true"></i>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="form-control checkbox-inline" ng-show="col.label.length" title="{{:: ts('Show label for every record even when this field is blank') }}">
<label><input type="checkbox" ng-model="col.forceLabel"> <span>{{:: ts('Always show') }}</span></label>
</div>
<button class="btn-xs pull-right" ng-click="$ctrl.parent.removeCol($index)" title="{{:: ts('Hide') }}">
<button type="button" class="btn-xs pull-right" ng-click="$ctrl.parent.removeCol($index)" title="{{:: ts('Hide') }}">
<i class="crm-i fa-ban"></i>
</button>
</div>
Expand Down Expand Up @@ -61,7 +61,7 @@
<legend>{{ $ctrl.parent.getFieldLabel(col.key) }}</legend>
<div class="form-inline">
<label>{{:: ts('Label:') }}</label> <input disabled class="form-control" type="text" ng-model="col.label" />
<button class="btn-xs pull-right" ng-click="$ctrl.parent.restoreCol($index)" title="{{:: ts('Show') }}">
<button type="button" class="btn-xs pull-right" ng-click="$ctrl.parent.restoreCol($index)" title="{{:: ts('Show') }}">
<i class="crm-i fa-undo"></i>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<legend>{{ $ctrl.parent.getFieldLabel(col.key) }}</legend>
<div class="form-inline">
<label>{{:: ts('Label:') }}</label> <input class="form-control" type="text" ng-model="col.label" />
<button class="btn-xs pull-right" ng-click="$ctrl.parent.removeCol($index)" title="{{:: ts('Hide') }}">
<button type="button" class="btn-xs pull-right" ng-click="$ctrl.parent.removeCol($index)" title="{{:: ts('Hide') }}">
<i class="crm-i fa-ban"></i>
</button>
</div>
Expand Down Expand Up @@ -47,7 +47,7 @@
<legend>{{ $ctrl.parent.getFieldLabel(col.key) }}</legend>
<div class="form-inline">
<label>{{:: ts('Label:') }}</label> <input disabled class="form-control" type="text" ng-model="col.label" />
<button class="btn-xs pull-right" ng-click="$ctrl.parent.restoreCol($index)" title="{{:: ts('Show') }}">
<button type="button" class="btn-xs pull-right" ng-click="$ctrl.parent.restoreCol($index)" title="{{:: ts('Show') }}">
<i class="crm-i fa-undo"></i>
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ext/search/ang/crmSearchAdmin/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<i class="crm-i fa-users"></i>
{{:: ts('Smart Group:') }} {{ $ctrl.savedSearch.groups[0].title }}
</a>
<button class="btn-xs btn-danger-outline crm-search-delete-display" ng-click="$ctrl.removeGroup()" title="{{ $ctrl.groupExists ? ts('Delete') : ts('Undelete') }}">
<button type="button" class="btn-xs btn-danger-outline crm-search-delete-display" ng-click="$ctrl.removeGroup()" title="{{ $ctrl.groupExists ? ts('Delete') : ts('Undelete') }}">
<i class="crm-i fa-{{ $ctrl.groupExists ? 'trash' : 'undo' }}"></i>
</button>
</li>
Expand All @@ -18,7 +18,7 @@
<i class="crm-i {{ $ctrl.displayTypes[display.type].icon }}"></i>
{{ display.label || ts('Untitled') }}
</a>
<button class="btn-xs btn-danger-outline crm-search-delete-display" ng-click="$ctrl.removeDisplay($index)" title="{{ display.trashed ? ts('Undelete') : ts('Delete') }}">
<button type="button" class="btn-xs btn-danger-outline crm-search-delete-display" ng-click="$ctrl.removeDisplay($index)" title="{{ display.trashed ? ts('Undelete') : ts('Delete') }}">
<i class="crm-i fa-{{ display.trashed ? 'undo' : 'trash' }}"></i>
</button>
</li>
Expand Down