From 785e43023395a5d9854c0c5469d1d7b0558459e4 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 24 Nov 2016 16:25:14 +0100 Subject: [PATCH] publishable checked when last change is marked publishable --- apps/wiki/forms.py | 1 + apps/wiki/templates/wiki/bootstrap.html | 2 +- lib/librarian | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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 -- 2.20.1