U4-11412 only show cancel and confirm button when a handler is attached
This commit is contained in:
@@ -18,7 +18,16 @@ function confirmDirective() {
|
||||
caption: '@'
|
||||
},
|
||||
link: function (scope, element, attr, ctrl) {
|
||||
scope.showCancel = false;
|
||||
scope.showConfirm = false;
|
||||
|
||||
if (scope.onConfirm) {
|
||||
scope.showConfirm = true;
|
||||
}
|
||||
|
||||
if (scope.onCancel) {
|
||||
scope.showCancel = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
<div class="umb-pane btn-toolbar umb-btn-toolbar">
|
||||
<div class="control-group umb-control-group">
|
||||
<a ng-if="onCancel" href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
|
||||
<a href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
|
||||
<a ng-if="showCancel" href class="btn btn-link" ng-click="onCancel()"><localize key="general_cancel">Cancel</localize></a>
|
||||
<a ng-if="showConfirm" href class="btn btn-primary" ng-click="onConfirm()"><localize key="general_ok">Ok</localize></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user