Automatically select all languages when selecting a mandatory language in the listview unpublish dialog
This commit is contained in:
committed by
Sebastiaan Janssen
parent
9d91402aca
commit
c4acf124b9
@@ -17,8 +17,14 @@
|
||||
|
||||
$scope.model.disableSubmitButton = !firstSelected;
|
||||
|
||||
//need to set the Save state to true if publish is true
|
||||
language.save = language.unpublish;
|
||||
if (language.isMandatory) {
|
||||
angular.forEach($scope.model.languages, function (lang) {
|
||||
if (lang !== language) {
|
||||
lang.unpublish = true;
|
||||
lang.disabled = language.unpublish;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function onInit() {
|
||||
@@ -50,6 +56,7 @@
|
||||
if (active) {
|
||||
//ensure that the current one is selected
|
||||
active.unpublish = true;
|
||||
changeSelection(active);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
model="language.unpublish"
|
||||
on-change="vm.changeSelection(language)"
|
||||
text="{{language.name}}"
|
||||
disabled="language.disabled"
|
||||
/>
|
||||
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user