From: Jan Szejko Date: Thu, 24 Nov 2016 15:25:14 +0000 (+0100) Subject: publishable checked when last change is marked publishable X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/785e43023395a5d9854c0c5469d1d7b0558459e4 publishable checked when last change is marked publishable --- diff --git a/apps/wiki/forms.py b/apps/wiki/forms.py index 08e5aea4..772e0be6 100644 --- a/apps/wiki/forms.py +++ b/apps/wiki/forms.py @@ -77,6 +77,7 @@ class DocumentTextSaveForm(forms.Form): self.fields['author_name'].required = False self.fields['author_email'].required = False self.fields['for_cybernauts'].initial = self.chunk.book.for_cybernauts + self.fields['publishable'].initial = self.chunk.head.publishable def save(self): if self.user.is_authenticated(): diff --git a/apps/wiki/templates/wiki/bootstrap.html b/apps/wiki/templates/wiki/bootstrap.html index fc0c3921..d5baf1cc 100644 --- a/apps/wiki/templates/wiki/bootstrap.html +++ b/apps/wiki/templates/wiki/bootstrap.html @@ -383,7 +383,7 @@ name: '{{forms.text_save.publishable.html_name}}', type: 'checkbox', description: '{{forms.text_save.publishable.help_text}}', - checked: false + checked: {{ forms.text_save.publishable.field.initial|yesno:"true,false" }} }); config.documentSaveForm.fields.push({ label: '{{forms.text_save.for_cybernauts.label}}', diff --git a/lib/librarian b/lib/librarian index 565aa32f..05a4485b 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 565aa32ff31bdbe6e2aaf9f47b124ac1f883a990 +Subproject commit 05a4485b020b9252f5ffc02d19c163705cbf26e2