'invalid_message' => $this->translatorAdmin->trans('form.account_password.message.invalid_passwords'), | 'invalid_message' => $this->translatorAdmin->trans('form.account_password.message.invalid_passwords'), | ||||
] | ] | ||||
); | ); | ||||
$builder->add( | |||||
'submit', | |||||
SubmitType::class, | |||||
array( | |||||
'label' => $this->translatorAdmin->transAction('save') | |||||
) | |||||
); | |||||
} | } | ||||
/** | /** |
TextType::class | TextType::class | ||||
); | ); | ||||
} | } | ||||
$builder->add( | |||||
'submit', | |||||
SubmitType::class, | |||||
[ | |||||
'label' => $this->translatorAdmin->transAction('save') | |||||
] | |||||
); | |||||
} | } | ||||
/** | /** |
{% block main %} | {% block main %} | ||||
<div class="col-8"> | <div class="col-8"> | ||||
{% set form_id = 'form-user-change-password' %} | |||||
{% embed '@LcSov/adminlte/embed/card.html.twig' %} | {% embed '@LcSov/adminlte/embed/card.html.twig' %} | ||||
{% block header_wrapper %}{% endblock %} | {% block header_wrapper %}{% endblock %} | ||||
{% block body %} | {% block body %} | ||||
{% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | {% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | ||||
{{ form_start(form, {attr: {id: form_id} }) }} | |||||
{{ form(form) }} | {{ form(form) }} | ||||
{{ form_end(form) }} | |||||
{% endblock %} | {% endblock %} | ||||
{% block footer_wrapper %}{% endblock %} | {% block footer_wrapper %}{% endblock %} | ||||
{% endembed %} | {% endembed %} | ||||
</div> | </div> | ||||
{% embed '@LcSov/adminlte/embed/form_footer.html.twig' %} | |||||
{% block width %}8{% endblock %} | |||||
{% block content %} | |||||
{% import '@LcSov/adminlte/macro/button.html.twig' as mbutton %} | |||||
{{ mbutton.button({form: form_id, icon: 'fa fa-check'}) }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% endblock main %} | {% endblock main %} |
{% block main %} | {% block main %} | ||||
<div class="col-8"> | <div class="col-8"> | ||||
{% set form_id = 'form-user-profile' %} | |||||
{% embed '@LcSov/adminlte/embed/card.html.twig' %} | {% embed '@LcSov/adminlte/embed/card.html.twig' %} | ||||
{% block header_wrapper %}{% endblock %} | {% block header_wrapper %}{% endblock %} | ||||
{% block body %} | {% block body %} | ||||
{% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | {% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | ||||
{{ form_start(form, {'attr' : {'id' : form_id}}) }} | |||||
{{ form(form) }} | {{ form(form) }} | ||||
{{ form_end(form) }} | |||||
{% endblock %} | {% endblock %} | ||||
{% block footer_wrapper %}{% endblock %} | {% block footer_wrapper %}{% endblock %} | ||||
{% endembed %} | {% endembed %} | ||||
</div> | </div> | ||||
{% endblock main %} | |||||
{% embed '@LcSov/adminlte/embed/form_footer.html.twig' %} | |||||
{% block width %}8{% endblock %} | |||||
{% block content %} | |||||
{% import '@LcSov/adminlte/macro/button.html.twig' as mbutton %} | |||||
{{ mbutton.button({form: form_id, icon: 'fa fa-check'}) }} | |||||
{% endblock %} | |||||
{% endembed %} | |||||
{% endblock main %} |
{% macro button(params) %} | |||||
{% set params_default = {type: 'submit', name: 'submit', class: 'float-right btn btn-primary', label: 'save', value: 'save'} %} | |||||
{% set params = params_default|merge(params) %} | |||||
<button type="{{ params.type }}" name="{{ params.name }}" class="{{ params.class }}" value="{{ params.value }}" form="{{ params.form }}"> | |||||
<span class="btn-label"> | |||||
{% if params.icon is defined %} | |||||
<i class="{{ params.icon }}"></i> | |||||
{% endif %} | |||||
{{ params.label|sov_trans_admin_action }} | |||||
</span> | |||||
</button> | |||||
{% endmacro %} |