Block definitions should be at the top level, not the included level
This commit is contained in:
@@ -14,4 +14,4 @@ Fixes/tweaks a few "issues" with the default UserFrosting installation, includin
|
||||
- Added 'hasRole' twig function to check if a user has a role (if a role doesn't exist, always returns false)
|
||||
- Added 'Auditer' role and split the activities permission away from site-admins (exclusive only) and everyone else
|
||||
- Made the input elements on the account settings page more in line with the other inputs (including the "hidden" and "disabled" mechanisms)
|
||||
- Update the "User" form to use the partial form elements for common styling with accounts page
|
||||
- Updated all* forms to use partial form elements.
|
||||
@@ -1,11 +1,19 @@
|
||||
{% extends "@admin/forms/group.html.twig" %}
|
||||
|
||||
{% block group_form %}
|
||||
{% include "forms/inputs/group-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_group_name %}
|
||||
{% include "forms/inputs/group-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/group-slug.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_group_slug %}
|
||||
{% include "forms/inputs/group-slug.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/group-icon.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_group_icon %}
|
||||
{% include "forms/inputs/group-icon.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/group-description.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_group_description %}
|
||||
{% include "forms/inputs/group-description.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_group_description %}
|
||||
{% include "forms/inputs/abstract/description.html.twig" with
|
||||
{
|
||||
"type" : "group",
|
||||
@@ -6,4 +5,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_group_icon %}
|
||||
{% include "forms/inputs/abstract/icon.html.twig" with
|
||||
{
|
||||
"type" : "group",
|
||||
@@ -8,4 +7,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_group_name %}
|
||||
{% include "forms/inputs/abstract/name.html.twig" with
|
||||
{
|
||||
"type" : "group",
|
||||
@@ -8,4 +7,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_group_slug %}
|
||||
{% include "forms/inputs/abstract/slug.html.twig" with
|
||||
{
|
||||
"type" : "group",
|
||||
@@ -6,4 +5,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_locale %}
|
||||
{% if site.registration.captcha %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -14,4 +13,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_register_locale %}
|
||||
{% if 'locale' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -14,4 +13,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_locale %}
|
||||
{% if 'locale' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<label for="input-register-first_name">{{translate('NAME_AND_EMAIL')}}</label>
|
||||
@@ -25,4 +24,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_password %}
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -11,4 +10,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_register_user_name %}
|
||||
{% if 'user_name' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -8,4 +7,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_role_description %}
|
||||
{% include "forms/inputs/abstract/description.html.twig" with
|
||||
{
|
||||
"type" : "role",
|
||||
@@ -6,4 +5,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_role_name %}
|
||||
{% include "forms/inputs/abstract/name.html.twig" with
|
||||
{
|
||||
"type" : "role",
|
||||
@@ -7,4 +6,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_role_slug %}
|
||||
{% include "forms/inputs/abstract/slug.html.twig" with
|
||||
{
|
||||
"type" : "role",
|
||||
@@ -6,4 +5,3 @@
|
||||
"col_width" : col_width
|
||||
}
|
||||
%}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_current_password %}
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -10,4 +9,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_email %}
|
||||
{% if 'email' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -17,4 +16,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_first_name %}
|
||||
{% if 'first_name' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -10,4 +9,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_group %}
|
||||
{% if 'group' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -20,4 +19,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_last_name %}
|
||||
{% if 'last_name' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -10,4 +9,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_locale %}
|
||||
{% if 'locale' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -18,4 +17,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_name %}
|
||||
{% if 'name' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="row">
|
||||
@@ -7,4 +6,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_new_password %}
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -17,4 +16,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_theme %}
|
||||
{% if 'theme' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -18,4 +17,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,3 @@
|
||||
{% block input_user_user_name %}
|
||||
{% if 'user_name' not in form.fields.hidden %}
|
||||
{% if col_width %}<div class="{{col_width}}">{% endif %}
|
||||
<div class="form-group">
|
||||
@@ -10,4 +9,3 @@
|
||||
</div>
|
||||
{% if col_width %}</div>{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -5,21 +5,32 @@
|
||||
<div class="row">
|
||||
{% block register_form %}
|
||||
|
||||
{% include "forms/inputs/register-name_email.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_register_name_email %}
|
||||
{% include "forms/inputs/register-name_email.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/register-user_name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_register_user_name %}
|
||||
{% include "forms/inputs/register-user_name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/register-password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_register_password %}
|
||||
{% include "forms/inputs/register-password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/register-locale.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_register_locale %}
|
||||
{% include "forms/inputs/register-locale.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/register-captcha.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_register_captcha %}
|
||||
{% include "forms/inputs/register-captcha.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="col-sm-12 collapse">
|
||||
<label>Spiderbro: Don't change me bro, I'm tryin'a catch some flies!</label>
|
||||
<input name="spiderbro" id="spiderbro" value="http://"/>
|
||||
</div>
|
||||
|
||||
{% block tos %}
|
||||
<div class="col-sm-12 text-left">
|
||||
<p>
|
||||
{{translate('TOS_AGREEMENT', {
|
||||
@@ -28,6 +39,7 @@
|
||||
}) | raw}}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,11 +4,17 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
{% block role_form %}
|
||||
{% include "forms/inputs/role-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_role_name %}
|
||||
{% include "forms/inputs/role-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/role-slug.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_role_slug %}
|
||||
{% include "forms/inputs/role-slug.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/role-description.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_role_description %}
|
||||
{% include "forms/inputs/role-description.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</div><br>
|
||||
<div class="row">
|
||||
|
||||
@@ -10,11 +10,15 @@
|
||||
|
||||
{% block settings_account %}
|
||||
<div class="row">
|
||||
{% include "forms/inputs/user-email.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_email %}
|
||||
{% include "forms/inputs/user-email.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% include "forms/inputs/user-new_password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_new_password %}
|
||||
{% include "forms/inputs/user-new_password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
@@ -22,7 +26,9 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
{% include "forms/inputs/user-current_password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_current_password %}
|
||||
{% include "forms/inputs/user-current_password.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -7,11 +7,15 @@
|
||||
|
||||
{% block settings_profile %}
|
||||
<div class="row">
|
||||
{% include "forms/inputs/user-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_name %}
|
||||
{% include "forms/inputs/user-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% include "forms/inputs/user-locale.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_locale %}
|
||||
{% include "forms/inputs/user-locale.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,33 @@
|
||||
{% extends "@admin/forms/user.html.twig" %}
|
||||
|
||||
{% block user_form %}
|
||||
{% include "forms/inputs/user-user_name.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% block input_user_user_name %}
|
||||
{% include "forms/inputs/user-user_name.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/user-group.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% block input_user_group %}
|
||||
{% include "forms/inputs/user-group.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/user-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% block input_user_name %}
|
||||
{% include "forms/inputs/user-name.html.twig" with { 'col_width': 'col-sm-12' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/user-email.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% block input_user_email %}
|
||||
{% include "forms/inputs/user-email.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/user-theme.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% block input_user_theme %}
|
||||
{% include "forms/inputs/user-theme.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% include "forms/inputs/user-locale.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% block input_user_locale %}
|
||||
{% include "forms/inputs/user-locale.html.twig" with { 'col_width': 'col-sm-6' } %}
|
||||
{% endblock %}
|
||||
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
{% include "forms/partials/user-set-password.html.twig" %}
|
||||
{% endif %}
|
||||
{% block input_user_description %}
|
||||
{% if 'password' not in form.fields.hidden %}
|
||||
{% include "forms/partials/user-set-password.html.twig" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user