The Framework Code

twigs/content/profile.twig

File List

{% set validate = TRUE %}
{% set breadcrumbs = [{link: base, text: 'Home'}, {text: 'Contact'}] %}
{% set schema = 'itemscope="" itemtype="http://schema.org/ContactPage"' %}
{% set usebootbox = FALSE %}
{% set title = 'Profile for ' ~ context.user.login %}

{% extends '@content/page.twig' %}

{% import '@util/formmacro.twig' as f %}

{% block headerbody %}
    <h1>Profile for {{context.user.login}}</h1>
{% endblock headerbody %}

{% block onload %}
    $('#cform').parsley()
{% endblock onload %}

{% block main %}
    <section class="row">
        <article class="mx-auto col-md-10 col-lg-8">
            {% include '@util/message.twig' %}
            {{f.startform({id: 'cform', method: 'post'})}}
                {{f.email({label: 'Email', id: 'em', name: 'emal', ph: 'Email', value: context.user.email})}}
                {{f.password({label: 'New Password', id: 'np', name: 'pw', ph: '***********'})}}
                {{f.password({label: 'Repeat Password', id: 'rnp', name: 'rpw', ph: '***********', valid: {'equalto': '#np', 'trigger': 'blur'}})}}
                {{f.submit({value: 'Update'})}}
            {{f.endform()}}
            <p class="mt-5"><a href="{{base}}/add2fa/" class="btn btn-sm btn-info">{{context.user.secret == '' ? 'Enable' : 'Disable'}} 2-Factor Authentication</a></p>
        </article>
    </section>
{% endblock main %}

{% block pagefooter %}
{% endblock pagefooter %}