X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/454635a6a1b93154e38eb761ac1e7e403f165a81..3ca475c8e10c811633dec531772e18da6e5fa33d:/src/wiki/forms.py diff --git a/src/wiki/forms.py b/src/wiki/forms.py index 46194677..f7827bc1 100644 --- a/src/wiki/forms.py +++ b/src/wiki/forms.py @@ -9,12 +9,12 @@ from documents.models import Chunk class DocumentPubmarkForm(forms.Form): """ - Form for marking revisions for publishing. + Form for approving revisions. """ id = forms.CharField(widget=forms.HiddenInput) publishable = forms.BooleanField(required=False, initial=True, - label=_('Publishable')) + label=_('Approved')) revision = forms.IntegerField(widget=forms.HiddenInput) @@ -58,8 +58,8 @@ class DocumentTextSaveForm(forms.Form): ) publishable = forms.BooleanField(required=False, initial=False, - label=_('Publishable'), - help_text=_(u"Mark this revision as publishable.") + label=_('Approve'), + help_text=_("Approve this revision.") ) def __init__(self, *args, **kwargs): @@ -68,6 +68,14 @@ class DocumentTextSaveForm(forms.Form): if user and user.is_authenticated: self.fields['author_name'].required = False self.fields['author_email'].required = False + try: + user.profile + except: + pass + else: + if user.profile.approve_by_default: + self.fields['publishable'].initial = True + return r