3396 - don't let user determine whether to publish mandatory languages on first publish. All mandatory languages with data is saved. If a mandatory language does not have data we cannot publish anything.

This commit is contained in:
Bjarke Berg
2019-01-24 08:16:55 +01:00
parent fedf0c78de
commit b389e6c07f
2 changed files with 3 additions and 1 deletions

View File

@@ -109,8 +109,9 @@
if (!vm.hasPristineVariants) {
vm.hasPristineVariants = pristineVariantFilter(variant);
}
if(vm.isNew && hasAnyData(variant)){
variant.publish = true;
variant.save = true;
}
});

View File

@@ -18,6 +18,7 @@
type="checkbox"
ng-model="variant.publish"
ng-change="vm.changeSelection(variant)"
ng-disabled="vm.isNew && variant.language.isMandatory"
style="margin-right: 8px;"
val-server-field="{{variant.htmlId}}" />
<div>