KEYCLOAK-5934: Disable paste for event filters (#5026)

This commit is contained in:
Stan Silvert 2018-06-01 04:28:56 -04:00 committed by Stian Thorgersen
parent 5e8db32329
commit cb3b7f3cb2
3 changed files with 13 additions and 3 deletions

View file

@ -1666,6 +1666,11 @@ module.controller('RealmEventsCtrl', function($scope, RealmEvents, realm, server
max : 5,
first : 0
}
$scope.disablePaste = function(e) {
e.preventDefault();
return false;
}
$scope.update = function() {
$scope.query.first = 0;
@ -1741,6 +1746,11 @@ module.controller('RealmAdminEventsCtrl', function($scope, RealmAdminEvents, rea
'tags': serverInfo.enums['resourceType']
};
$scope.disablePaste = function(e) {
e.preventDefault();
return false;
}
$scope.update = function() {
$scope.query.first = 0;
for (var i in $scope.query) {

View file

@ -33,13 +33,13 @@
<form class="form-horizontal" data-ng-show="filter">
<div class="form-group">
<label class="col-sm-2 control-label" for="adminEnabledEventOperations">{{:: 'operation-types' | translate}}</label>
<div class="col-sm-5" onkeypress="return false;">
<div class="col-sm-5" onkeypress="return false;" ng-paste="disablePaste($event)">
<input ui-select2="adminEnabledEventOperationsOptions" id="adminEnabledEventOperations" ng-model="query.operationTypes" data-placeholder="{{:: 'select-operations.placeholder' | translate}}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="adminEnabledEventResourceTypes">{{:: 'resource-types' | translate}}</label>
<div class="col-sm-5" onkeypress="return false;">
<div class="col-sm-5" onkeypress="return false;" ng-paste="disablePaste($event)">
<input ui-select2="adminEnabledEventResourceTypesOptions" id="adminEnabledEventResourceTypes" ng-model="query.resourceTypes" data-placeholder="{{:: 'select-resource-types.placeholder' | translate}}"/>
</div>
</div>

View file

@ -31,7 +31,7 @@
<form class="form-horizontal">
<div class="form-group" data-ng-show="filter">
<label class="col-md-2 control-label" for="eventTypes">{{:: 'event-type' | translate}}</label>
<div class="col-sm-5" onkeypress="return false;">
<div class="col-sm-5" onkeypress="return false;" ng-paste="disablePaste($event)">
<input ui-select2="eventSelectOptions" id="eventTypes" ng-model="query.type" data-placeholder="{{:: 'select-event-types.placeholder' | translate}}"/>
</div>
</div>