From: Coleman Watts Date: Fri, 16 Oct 2020 18:39:37 +0000 (-0400) Subject: Search ext: Improve wording of update & delete actions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8e4920a5b0022ebb902e6711c9c493f99389d61e;p=civicrm-core.git Search ext: Improve wording of update & delete actions --- diff --git a/ext/search/ang/searchActions/crmSearchActionDelete.ctrl.js b/ext/search/ang/searchActions/crmSearchActionDelete.ctrl.js index f81d915acf..4f0cf17a65 100644 --- a/ext/search/ang/searchActions/crmSearchActionDelete.ctrl.js +++ b/ext/search/ang/searchActions/crmSearchActionDelete.ctrl.js @@ -7,6 +7,7 @@ ctrl = $scope.$ctrl = this; this.entity = searchMeta.getEntity(model.entity); + this.entityTitle = model.ids.length === 1 ? this.entity.title : this.entity.titlePlural; this.cancel = function() { dialogService.cancel('crmSearchAction'); diff --git a/ext/search/ang/searchActions/crmSearchActionDelete.html b/ext/search/ang/searchActions/crmSearchActionDelete.html index a8c95de8a2..855f3570d4 100644 --- a/ext/search/ang/searchActions/crmSearchActionDelete.html +++ b/ext/search/ang/searchActions/crmSearchActionDelete.html @@ -1,10 +1,10 @@
-

{{:: ts('Are you sure you want to delete %1 %2?', {1: model.ids.length, 2: $ctrl.entity.title}) }}

+

{{:: ts('Are you sure you want to delete %1 %2?', {1: model.ids.length, 2: $ctrl.entityTitle}) }}


- +
diff --git a/ext/search/ang/searchActions/crmSearchActionUpdate.ctrl.js b/ext/search/ang/searchActions/crmSearchActionUpdate.ctrl.js index b44acb29a9..18bd6fd082 100644 --- a/ext/search/ang/searchActions/crmSearchActionUpdate.ctrl.js +++ b/ext/search/ang/searchActions/crmSearchActionUpdate.ctrl.js @@ -7,6 +7,7 @@ ctrl = $scope.$ctrl = this; this.entity = searchMeta.getEntity(model.entity); + this.entityTitle = model.ids.length === 1 ? this.entity.title : this.entity.titlePlural; this.values = []; this.add = null; diff --git a/ext/search/ang/searchActions/crmSearchActionUpdate.html b/ext/search/ang/searchActions/crmSearchActionUpdate.html index 52787c6abe..a1af56da3c 100644 --- a/ext/search/ang/searchActions/crmSearchActionUpdate.html +++ b/ext/search/ang/searchActions/crmSearchActionUpdate.html @@ -1,5 +1,6 @@
+

{{:: ts('Update the %1 selected %2 with the following values:', {1: model.ids.length, 2: $ctrl.entityTitle}) }}

@@ -10,7 +11,7 @@
- +