Explicitly set the form dirty when toggling a boolean
This commit is contained in:
committed by
Sebastiaan Janssen
parent
99f0e6c05a
commit
5637c44f69
@@ -1,4 +1,4 @@
|
||||
function booleanEditorController($scope) {
|
||||
function booleanEditorController($scope, angularHelper) {
|
||||
|
||||
function setupViewModel() {
|
||||
$scope.renderModel = {
|
||||
@@ -28,7 +28,8 @@ function booleanEditorController($scope) {
|
||||
};
|
||||
|
||||
// Update the value when the toggle is clicked
|
||||
$scope.toggle = function(){
|
||||
$scope.toggle = function () {
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
if($scope.renderModel.value){
|
||||
$scope.model.value = "0";
|
||||
setupViewModel();
|
||||
|
||||
Reference in New Issue
Block a user