Bring back restore functionality
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 17 Dec 2013 16:22:37 +0000 (17:22 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 12 Aug 2014 09:47:11 +0000 (11:47 +0200)
apps/wiki/static/wiki/editor
apps/wiki/templates/wiki/bootstrap.html

index db307d8..e68778f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit db307d848f244e349d6fd3bbfc5acef24d698862
+Subproject commit e68778f27b18c21c23387d7609d825ab3a192af7
index 1b4737a..b4e3862 100644 (file)
@@ -28,6 +28,7 @@
                 documentSaveUrl: function(id) { return '/editor/text/' + id + '/'; },
                 documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'},
                 documentDiffUrl: function(id) { return '/editor/diff/' + id + '/'; },
+                documentRestoreUrl: function(id) { return '/editor/revert/' + id + '/'},
 
                 documentSaveForm: {
                     fields: [
                     ],
                     content_field_name: '{{forms.text_save.text.html_name}}',
                     version_field_name: '{{forms.text_save.parent_revision.html_name}}'
+                },
+
+                documentRestoreForm: {
+                    fields: [
+                        {label: '{{forms.text_revert.comment.label}}', name: '{{forms.text_revert.comment.html_name}}', type: 'textarea'}
+                    ],
+                    version_field_name: '{{forms.text_revert.revision.html_name}}'
                 }
             };
 
                     {label: '{{forms.text_save.author_name.label}}', name: '{{forms.text_save.author_name.html_name}}', type: 'input', description: '{{forms.text_save.author_name.help_text}}'},
                     {label: '{{forms.text_save.author_email.label}}', name: '{{forms.text_save.author_email.html_name}}', type: 'input', description: '{{forms.text_save.author_email.help_text}}'}
                 );
+
+                config.documentRevertForm.fields.push(
+                    {label: '{{forms.text_revert.author_name.label}}', name: '{{forms.text_revert.author_name.html_name}}', type: 'input', description: '{{forms.text_revert.author_name.help_text}}'},
+                    {label: '{{forms.text_revert.author_email.label}}', name: '{{forms.text_revert.author_email.html_name}}', type: 'input', description: '{{forms.text_revert.author_email.help_text}}'}
+                );
             {% endif %}
 
             {% autoescape off%}