Files
sprinkle-uf-tweaks/templates/forms/partials/input-user-theme.html.twig

21 lines
1.0 KiB
Twig

{% block input_user_theme %}
{% if 'theme' not in form.fields.hidden %}
{% if col_width %}<div class="{{col_width}}">{% endif %}
<div class="form-group">
<label for="input-user-theme">{{translate('THEME')}}</label>
<div class="input-group">
<span class="input-group-addon"><i class="fas fa-puzzle-piece fa-fw"></i></span>
{% if 'theme' in form.fields.disabled %}
<input type="text" class="form-control" name="theme" value="{{themes[user.theme]}}" disabled>
{% else %}
<select id="input-user-theme" class="form-control js-select2" name="theme">
{% for option, label in theme %}
<option value="{{option}}" {% if (option == user.theme) %}selected{% endif %}>{{label}}</option>
{% endfor %}
</select>
{% endif %}
</div>
</div>
{% if col_width %}</div>{% endif %}
{% endif %}
{% endblock %}