Commits

Saurabh Kathpalia committed 8ce06c4

Fix to issue #408

Comments (0)

Files changed (4)

MoinMoin/templates/basic.js

     // 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;

MoinMoin/themes/basic/templates/usersettings.html

     <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 %}

MoinMoin/themes/basic/templates/usersettings_ajax.html

     {{ user_forms.navigation(form) }}
 {% elif part == 'options' %}
     {{ user_forms.options(form) }}
+{% elif part == 'subscriptions' %}
+    {{ user_forms.subscriptions(form) }}
 {% endif %}

MoinMoin/themes/basic/templates/usersettings_forms.html

 {{ 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">
                 <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>