{% extends '/stdgrid.html.twig' %} {% block title %}{{ 'Settings' | trans }}{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock stylesheets %} {% macro settings_details_element(title, summary, form_name, context) %} {{ title | trans }} {{ icon('arrow-down', 'icon icon-details-open') | raw }} {{ summary | trans }} {{ form(attribute(context, form_name) | default) }} {% endmacro settings_details_element %} {% macro settings_details_container(title, summary, tabs, context) %} {{ title | trans }} {{ icon('arrow-down', 'icon icon-details-open') | raw }} {{ summary | trans }} {% if title == 'Profile' %} {{ _self.settings_details_element('Personal Info', 'Nickname, Homepage, Bio, Self Tags and more.', 'profile', context) }} {% for tab in context.profile_tabs %} {# TODO: add ID and open_details and to parent #} {{ tab['title'] }}{{ icon('arrow-down', 'icon icon-details-open') | raw }} {{ tab['desc'] }} {% include tab['controller']['_template'] with tab['controller'] only %} {% endfor %} {% elseif title == 'Email' %} {{ form(context.email) }} {% elseif title == 'Password' %} {{ form(context.password) }} {% elseif title == 'Language' %} {{ form(context.language) }} {% elseif title == 'Notifications' %} {% for transport, form_transport in context.tabbed_forms_notify %} {{ transport }}{{ icon('arrow-down', 'icon icon-details-open') | raw }} {{ transport }}'s notification options. {{ form(form_transport) }} {% endfor %} {% endif %} {% endmacro settings_details_container %} {% block body %} Settings {% set profile_tabs = handle_event('PopulateProfileSettingsTabs', app.request) %} {{ _self.settings_details_container('Profile', 'Personal Information, Avatar and Profile', ['profile', 'personal-info'], _context) }} {{ _self.settings_details_container('Email', 'Set incoming and outgoing email settings', ['email'], _context) }} {{ _self.settings_details_container('Password', 'Change current password', ['password'], _context) }} {{ _self.settings_details_container('Language', 'Select and set language preferences', ['language'], _context) }} {{ _self.settings_details_container('Notifications', 'Enable/disable notifications (Email, XMPP, Replies...)', ['notifications'], _context) }} {% endblock body %} {% block javascripts %}{% endblock %}