Merge pull request #15322 from alifrumin/removePrintIcon
[civicrm-core.git] / ang / api4Explorer / Explorer.js
index c7e08dd9605382a92b3e26629ff68dbc9acfdb11..3d596a2b18b3d514acd210634d32b6f9944bb70f 100644 (file)
@@ -21,7 +21,7 @@
   });
 
   angular.module('api4Explorer').controller('Api4Explorer', function($scope, $routeParams, $location, $timeout, $http, crmUiHelp, crmApi4) {
-    var ts = $scope.ts = CRM.ts('api4');
+    var ts = $scope.ts = CRM.ts();
     $scope.entities = entities;
     $scope.actions = actions;
     $scope.fields = [];
       },
       templateUrl: '~/api4Explorer/WhereClause.html',
       link: function (scope, element, attrs) {
-        var ts = scope.ts = CRM.ts('api4');
+        var ts = scope.ts = CRM.ts();
         scope.newClause = '';
         scope.conjunctions = ['AND', 'OR', 'NOT'];
         scope.operators = CRM.vars.api4.operators;
       },
       require: 'ngModel',
       link: function (scope, element, attrs, ctrl) {
-        var ts = scope.ts = CRM.ts('api4'),
-          multi = _.includes(['IN', 'NOT IN'], scope.data.op),
+        var ts = scope.ts = CRM.ts(),
+          multi = _.includes(['IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'], scope.data.op),
           entity = $routeParams.api4entity,
           action = $routeParams.api4action;
 
           if (!op) {
             op = field.serialize || dataType === 'Array' ? 'IN' : '=';
           }
-          multi = _.includes(['IN', 'NOT IN'], op);
+          multi = _.includes(['IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN'], op);
           if (op === 'IS NULL' || op === 'IS NOT NULL') {
             $el.hide();
             return;
                 {id: '0', text: ts('No')}
               ]});
             }
-          } else if (dataType === 'Integer') {
+          } else if (dataType === 'Integer' && !multi) {
             $el.attr('type', 'number');
           }
         }
       },
       templateUrl: '~/api4Explorer/Chain.html',
       link: function (scope, element, attrs) {
-        var ts = scope.ts = CRM.ts('api4');
+        var ts = scope.ts = CRM.ts();
 
         function changeEntity(newEntity, oldEntity) {
           // When clearing entity remove this chain