Source

moin-2.0 / MoinMoin / templates / usersettings_forms.html

Full commit
Julian Brost 959fc2a 





xiaq 100197c 




Julian Brost 959fc2a 










xiaq 100197c 


Julian Brost 959fc2a 












xiaq 100197c 
Julian Brost 959fc2a 









xiaq 100197c 



Julian Brost 959fc2a 




















xiaq 100197c 

Roger Haase 90eb2ea 
xiaq 100197c 

Julian Brost 959fc2a 




Roger Haase 269cd70 




























{% import "forms.html" as forms %}

{% macro personal(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{{ forms.render_errors(form) }}
<dl>
    {{ forms.render(form['name']) }}
    {{ forms.render(form['aliasname']) }}
    {{ forms.render(form['openid']) }}
    {{ forms.render(form['timezone']) }}
    {{ forms.render(form['locale']) }}
</dl>
{{ forms.render_hidden('part', 'personal') }}
{{ forms.render_button(_("Save")) }}
{{ gen.form.close() }}
{% endmacro %}


{% macro password(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{{ forms.render_errors(form) }}
<dl>
    {{ forms.render(form['password_current']) }}
    {{ forms.render(form['password1']) }}
    {{ forms.render(form['password2']) }}
</dl>
{{ forms.render_hidden('part', 'password') }}
{{ forms.render_button(_("Change password")) }}
{{ gen.form.close() }}
{% endmacro %}

{% macro notification(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{% if cfg.user_email_verification %}
<p>{{ _("Changing your email address requires you to verify it. A link will be sent to you.") }}</p>
{% endif %}
{{ forms.render_errors(form) }}
<dl>
    {{ forms.render(form['email']) }}
</dl>
{{ forms.render_hidden('part', 'notification') }}
{{ forms.render_button(_("Save")) }}
{{ gen.form.close() }}
{% endmacro %}

{% macro ui(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{{ forms.render_errors(form) }}
<dl>
    {{ forms.render(form['theme_name']) }}
    {{ forms.render(form['css_url']) }}
    {{ forms.render(form['edit_rows']) }}
    {{ forms.render(form['results_per_page']) }}
</dl>
{{ forms.render_hidden('part', 'ui') }}
{{ forms.render_button(_("Save")) }}
{{ gen.form.close() }}
{% endmacro %}

{% macro navigation(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{{ forms.render_errors(form) }}
<dl>
    {# TODO: find a good way to handle quicklinks #}
</dl>
{{ forms.render_hidden('part', 'navigation') }}
{{ forms.render_button(_("Save")) }}
{{ gen.form.close() }}
{% endmacro %}

{% macro options(form) %}
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings')) }}
{{ forms.render_errors(form) }}
<dl>
    {{ forms.render(form['mailto_author']) }}
    {{ forms.render(form['edit_on_doubleclick']) }}
    {{ forms.render(form['scroll_page_after_edit']) }}
    {{ forms.render(form['show_comments']) }}
    {{ forms.render(form['disabled']) }}
</dl>
{{ forms.render_hidden('part', 'options') }}
{{ forms.render_button(_("Save")) }}
{{ gen.form.close() }}
{% endmacro %}

{# javascript functions within common.js are dependent upon the structure, classes and ids defined here #}
{% macro all_usersettings_forms(form_objs) %}
<div id="moin-usersettings">
    <div id="personal" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#personal">{{ _("Personal Settings") }}</a></h2>
        {{ personal(form_objs.personal) }}
    </div>
    <div id="password" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#password">{{ _("Change Password") }}</a></h2>
        {{ password(form_objs.password) }}
    </div>
    <div id="notification" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#notification">{{ _("Notification Settings") }}</a></h2>
        {{ notification(form_objs.notification) }}
    </div>
    <div id="ui" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#ui">{{ _("Wiki Appearance Settings") }}</a></h2>
        {{ ui(form_objs.ui) }}
    </div>
    <div id="navigation" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#navigation">{{ _("Navigation Settings") }}</a></h2>
        {{ navigation(form_objs.navigation) }}
    </div>
    <div id="options" class="moin-tab-body moin-form">
        <h2 class="moin-settings-head"><a href="#options">{{ _("Options") }}</a></h2>
        {{ options(form_objs.options) }}
    </div>
</div>
{% endmacro %}