<h3>
    <span class="fas fa-wrench"></span>
    {% trans %}Settings{% endtrans %}
    {{ pageSetVar('title', 'Profile settings'|trans) }}
</h3>

{% if getModVar('ZConfig', 'sessionstoretofile', constant('Zikula\\SecurityCenterModule\\Constant::SESSION_STORAGE_FILE')) == constant('Zikula\\SecurityCenterModule\\Constant::SESSION_STORAGE_FILE') %}
    <div class="alert alert-danger">{% trans %}Sessions are configured to store in a file. This prevents some functionality within the profile module related to tracking who is online.{% endtrans %}&nbsp;
        <a href="{{ path('zikulasecuritycentermodule_config_config') }}">{% trans %}Reconfigure session storage{% endtrans %}</a>
    </div>
{% endif %}
{% if getModVar('ZConfig', 'profilemodule') != 'ZikulaProfileModule' %}
    <div class="alert alert-danger">{% trans %}The profile module is not selected as the system profile module. This is needed for full functionality.{% endtrans %}&nbsp;
        <a href="{{ path('zikulasettingsmodule_settings_mainsettings') }}">{% trans %}Update system settings{% endtrans %}</a>
    </div>
{% endif %}

{{ form_start(form) }}
{{ form_errors(form) }}

<fieldset>
    <legend>{% trans %}Registered users list settings{% endtrans %}</legend>
    {{ form_row(form.viewregdate) }}
    {{ form_row(form.memberslistitemsperpage) }}
    {{ form_row(form.onlinemembersitemsperpage) }}
    {{ form_row(form.recentmembersitemsperpage) }}
    {{ form_row(form.activeminutes) }}
    {{ form_row(form.filterunverified) }}
</fieldset>
<fieldset>
    <legend>{% trans %}Avatar settings{% endtrans %}</legend>
    {{ form_row(attribute(form, constant('Zikula\\ProfileModule\\ProfileConstant::MODVAR_AVATAR_IMAGE_PATH'))) }}
    {% if pathWarning is not empty %}
        <p class="alert alert-danger"><strong>{{ pathWarning }}</strong></p>
    {% endif %}
    {{ form_row(attribute(form, constant('Zikula\\ProfileModule\\ProfileConstant::MODVAR_GRAVATARS_ENABLED'))) }}
    {{ form_row(attribute(form, constant('Zikula\\ProfileModule\\ProfileConstant::MODVAR_GRAVATAR_IMAGE'))) }}
    {{ form_row(form.allowUploads) }}
    <div id="uploadSettings">
        {{ form_row(form.shrinkLargeImages) }}
        <div id="shrinkSettings">
            {{ form_row(form.maxSize) }}
            {{ form_row(form.maxWidth) }}
            {{ form_row(form.maxHeight) }}
        </div>
    </div>
</fieldset>
<div class="form-group row">
    <div class="col-md-9 offset-md-3">
        {{ form_widget(form.save) }}
        {{ form_widget(form.cancel) }}
    </div>
</div>
{{ form_end(form) }}
{{ pageAddAsset('javascript', zasset('@ZikulaProfileModule:js/ZikulaProfileModule.Config.js')) }}
