Merge pull request #662 from normanjaeckel/MotionPreamble
Insert motion preamble in text field of the form of new motions
This commit is contained in:
commit
c0b45afac6
@ -13,6 +13,7 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.utils.translation import ugettext as _, ugettext_lazy
|
from django.utils.translation import ugettext as _, ugettext_lazy
|
||||||
|
|
||||||
|
from openslides.config.api import config
|
||||||
from openslides.utils.forms import CssClassMixin
|
from openslides.utils.forms import CssClassMixin
|
||||||
from openslides.utils.forms import CleanHtmlFormMixin
|
from openslides.utils.forms import CleanHtmlFormMixin
|
||||||
from openslides.utils.person import PersonFormField, MultiplePersonFormField
|
from openslides.utils.person import PersonFormField, MultiplePersonFormField
|
||||||
@ -58,6 +59,8 @@ class BaseMotionForm(CleanHtmlFormMixin, CssClassMixin, forms.ModelForm):
|
|||||||
self.initial['title'] = self.motion.title
|
self.initial['title'] = self.motion.title
|
||||||
self.initial['text'] = self.motion.text
|
self.initial['text'] = self.motion.text
|
||||||
self.initial['reason'] = self.motion.reason
|
self.initial['reason'] = self.motion.reason
|
||||||
|
else:
|
||||||
|
self.initial['text'] = config['motion_preamble']
|
||||||
super(BaseMotionForm, self).__init__(*args, **kwargs)
|
super(BaseMotionForm, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user