@@ -73,14 +73,6 @@ class ChangePasswordFormType extends AbstractType | |||
'invalid_message' => $this->translatorAdmin->trans('form.account_password.message.invalid_passwords'), | |||
] | |||
); | |||
$builder->add( | |||
'submit', | |||
SubmitType::class, | |||
array( | |||
'label' => $this->translatorAdmin->transAction('save') | |||
) | |||
); | |||
} | |||
/** |
@@ -51,14 +51,6 @@ class ProfileFormType extends AbstractType | |||
TextType::class | |||
); | |||
} | |||
$builder->add( | |||
'submit', | |||
SubmitType::class, | |||
[ | |||
'label' => $this->translatorAdmin->transAction('save') | |||
] | |||
); | |||
} | |||
/** |
@@ -7,13 +7,24 @@ | |||
{% block main %} | |||
<div class="col-8"> | |||
{% set form_id = 'form-user-change-password' %} | |||
{% embed '@LcSov/adminlte/embed/card.html.twig' %} | |||
{% block header_wrapper %}{% endblock %} | |||
{% block body %} | |||
{% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | |||
{{ form_start(form, {attr: {id: form_id} }) }} | |||
{{ form(form) }} | |||
{{ form_end(form) }} | |||
{% endblock %} | |||
{% block footer_wrapper %}{% endblock %} | |||
{% endembed %} | |||
</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 %} |
@@ -6,13 +6,24 @@ | |||
{% block main %} | |||
<div class="col-8"> | |||
{% set form_id = 'form-user-profile' %} | |||
{% embed '@LcSov/adminlte/embed/card.html.twig' %} | |||
{% block header_wrapper %}{% endblock %} | |||
{% block body %} | |||
{% form_theme form '@LcSov/adminlte/crud/form_theme.html.twig' %} | |||
{{ form_start(form, {'attr' : {'id' : form_id}}) }} | |||
{{ form(form) }} | |||
{{ form_end(form) }} | |||
{% endblock %} | |||
{% block footer_wrapper %}{% endblock %} | |||
{% endembed %} | |||
</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 %} |
@@ -0,0 +1,13 @@ | |||
{% 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 %} |