changeset 2576:8ce06c4e710e

Fix to issue #408
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Sat, 08 Mar 2014 22:37:55 +0530
parents 2d0bbf33f76a
children 2b9002879ed0
files MoinMoin/templates/basic.js MoinMoin/themes/basic/templates/usersettings.html MoinMoin/themes/basic/templates/usersettings_ajax.html MoinMoin/themes/basic/templates/usersettings_forms.html
diffstat 4 files changed, 23 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/basic.js	Tue Feb 25 04:43:22 2014 +0530
+++ b/MoinMoin/templates/basic.js	Sat Mar 08 22:37:55 2014 +0530
@@ -2,7 +2,7 @@
     // this depends on the id's used for different tab-panes in modify.html (Basic Theme)
     var edit = false;
     $('#meta, #help').removeClass('active');
-    $('#password, #notification, #ui, #navigation, #options, #acl').removeClass('active');
+    $('#password, #notification, #ui, #navigation, #options, #acl, #subscriptions').removeClass('active');
     $('textarea').autosize();
     $('#moin-save-text-button').click(function (){
         edit = true;
--- a/MoinMoin/themes/basic/templates/usersettings.html	Tue Feb 25 04:43:22 2014 +0530
+++ b/MoinMoin/themes/basic/templates/usersettings.html	Sat Mar 08 22:37:55 2014 +0530
@@ -10,6 +10,7 @@
     <li><a href="#ui" data-toggle="tab">{{ _("Wiki Appearance Settings") }}</a></li>
     <li><a href="#navigation" data-toggle="tab">{{ _("Navigation Settings") }}</a></li>
     <li><a href="#options" data-toggle="tab">{{ _("Options") }}</a></li>
+    <li><a href="#subscriptions" data-toggle="tab">{{ _("Subscriptions") }}</a></li>
 </ul>
 {{ user_forms.all_usersettings_forms(form_objs) }}
 {% endblock %}
--- a/MoinMoin/themes/basic/templates/usersettings_ajax.html	Tue Feb 25 04:43:22 2014 +0530
+++ b/MoinMoin/themes/basic/templates/usersettings_ajax.html	Sat Mar 08 22:37:55 2014 +0530
@@ -12,4 +12,6 @@
     {{ user_forms.navigation(form) }}
 {% elif part == 'options' %}
     {{ user_forms.options(form) }}
+{% elif part == 'subscriptions' %}
+    {{ user_forms.subscriptions(form) }}
 {% endif %}
--- a/MoinMoin/themes/basic/templates/usersettings_forms.html	Tue Feb 25 04:43:22 2014 +0530
+++ b/MoinMoin/themes/basic/templates/usersettings_forms.html	Sat Mar 08 22:37:55 2014 +0530
@@ -152,6 +152,22 @@
 {{ gen.form.close() }}
 {% endmacro %}
 
+{% macro subscriptions(form) %}
+{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
+{{ forms.render_errors(form) }}
+<div class="form-group">
+    {{ gen.label(form['subscriptions']) }}
+    <div class="input-group">
+        {{ gen.textarea(form['subscriptions'], cols="60", rows="10", class="form-control") }}
+    </div>
+</div>
+{{ forms.render_hidden('part', 'subscriptions') }}
+<div class="form-group">
+    {{ forms.render_submit(form, class='btn btn-primary') }}
+</div>
+{{ gen.form.close() }}
+{% endmacro %}
+
 {# javascript functions within basic.js are dependent upon the structure, classes and ids defined here #}
 {% macro all_usersettings_forms(form_objs) %}
 <div id="moin-usersettings">
@@ -176,6 +192,9 @@
                 <div id="options" class="tab-pane active">
                     {{ options(form_objs.options) }}
                 </div>
+                <div id="subscriptions" class="tab-pane active">
+                    {{ subscriptions(form_objs.subscriptions) }}
+                </div>
             </div>
         </div>
     </div>