{# -*- coding: utf-8 -*- This file is part of Invenio. Copyright (C) 2015-2018 CERN. Invenio is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {%- extends config.USERPROFILES_SETTINGS_TEMPLATE %} {% from "invenio_userprofiles/settings/_macros.html" import render_field, form_errors %} {% set panel_title = _("Profile") %} {% set panel_icon = "user icon" %} {%- block settings_content scoped %}
{%- block settings_content_title scoped %} {%- if panel_icon %} {%- block settings_content_title_icon scoped %} {%- endblock %} {%- endif %} {{ panel_title|default("") }} {%- endblock %}
{%- block settings_body scoped %}
{%- block settings_form %} {%- if security.confirmable and not current_user.confirmed_at %}
{{ verification_form.csrf_token }}
{{ _("You have not yet verified your email address.") }} {{ verification_form.send_verification_email(class_="compact ui small basic button") }}
{%- endif %} {%- set form = profile_form %} {%- set read_only = config.USERPROFILES_READ_ONLY %}
{%- for field in form %} {%- if field.widget.input_type == 'hidden' %} {{ field() }} {%- elif not read_only or "repeat" not in field.id %} {{ render_field(field, autofocus=True, enabled=not read_only, placeholder=field.label.text) }} {%- endif %} {%- endfor %} {%- if not read_only %}
{{ _('Cancel') }}
{%- endif %}
{%- endblock settings_form %}
{%- endblock settings_body %}
{{ _("Preferences") }}
{%- set form = preferences_form %} {%- set read_only = config.USERPROFILES_READ_ONLY %}
{%- for field in form %} {%- if field.widget.input_type == 'hidden' %} {{ field() }} {%- else %} {{ render_field(field, placeholder=field.label.text, field_class="form-control no-dots-list pl-0") }} {%- endif %} {%- endfor %} {%- if not read_only %}
{{ _('Cancel') }}
{%- endif %}
{% endblock %}