Allow 'trivial changes' in motion update (Fixes #1863)
This commit is contained in:
parent
8bf82a0306
commit
7967da0b4e
@ -215,6 +215,15 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
||||
},
|
||||
ngModelElAttrs: {'ckeditor': 'CKEditorOptions'}
|
||||
},
|
||||
{
|
||||
key: 'disable_versioning',
|
||||
type: 'checkbox',
|
||||
templateOptions: {
|
||||
label: gettextCatalog.getString('Trivial change'),
|
||||
description: gettextCatalog.getString("Don't create a new version.")
|
||||
},
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
key: 'more',
|
||||
type: 'checkbox',
|
||||
@ -574,11 +583,6 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
||||
$scope.model.workflow_id = Config.get('motions_workflow').value;
|
||||
// get all form fields
|
||||
$scope.formFields = MotionForm.getFormFields();
|
||||
for (var i = 0; i < $scope.formFields.length; i++) {
|
||||
if ($scope.formFields[i].key == "identifier") {
|
||||
$scope.formFields[i].hide = true;
|
||||
}
|
||||
}
|
||||
// save motion
|
||||
$scope.save = function (motion) {
|
||||
Motion.create(motion).then(
|
||||
@ -635,6 +639,13 @@ angular.module('OpenSlidesApp.motions.site', ['OpenSlidesApp.motions'])
|
||||
// get reason of latest version
|
||||
$scope.formFields[i].defaultValue = motion.getReason(-1);
|
||||
}
|
||||
if ($scope.formFields[i].key == "disable_versioning" &&
|
||||
Config.get('motions_allow_disable_versioning')) {
|
||||
// check current state if versioning is active
|
||||
if (motion.state.versioning) {
|
||||
$scope.formFields[i].hide = false;
|
||||
}
|
||||
}
|
||||
if ($scope.formFields[i].key == "workflow_id") {
|
||||
// get saved workflow id from state
|
||||
$scope.formFields[i].defaultValue = motion.state.workflow_id;
|
||||
|
@ -31,7 +31,7 @@
|
||||
<h1>{{ motion.getTitle() }}</h1>
|
||||
<h2>
|
||||
<translate>Motion</translate> {{ motion.identifier }}
|
||||
<span ng-if="motion.versions.length > 1" >| Version {{ motion.active_version }}</span>
|
||||
<span ng-if="motion.versions.length > 1" >| Version {{ motion.getVersion().version_number }}</span>
|
||||
<span ng-if="motion.agenda_item.item_number">
|
||||
–
|
||||
<translate>Agenda</translate>: {{ motion.agenda_item.item_number }}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<h1>{{ motion.getTitle() }}</h1>
|
||||
<h2>
|
||||
<translate>Motion</translate> {{ motion.identifier }}
|
||||
<span ng-if="motion.versions.length > 1" >| Version {{ motion.active_version }}</span>
|
||||
<span ng-if="motion.versions.length > 1" >| Version {{ motion.getVersion().version_number }}</span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user