publishable checked when last change is marked publishable
authorJan Szejko <janek37@gmail.com>
Thu, 24 Nov 2016 15:25:14 +0000 (16:25 +0100)
committerJan Szejko <janek37@gmail.com>
Thu, 24 Nov 2016 15:25:14 +0000 (16:25 +0100)
apps/wiki/forms.py
apps/wiki/templates/wiki/bootstrap.html
lib/librarian

index 08e5aea..772e0be 100644 (file)
@@ -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():
index fc0c392..d5baf1c 100644 (file)
                     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}}',
index 565aa32..05a4485 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 565aa32ff31bdbe6e2aaf9f47b124ac1f883a990
+Subproject commit 05a4485b020b9252f5ffc02d19c163705cbf26e2