first commit
This commit is contained in:
22
templates/Kernel/partials/_admin_form_actions.twig
Normal file
22
templates/Kernel/partials/_admin_form_actions.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
{#
|
||||
Convention canonique : primary_label / secondary_href / secondary_label.
|
||||
Compatibilité conservée avec submit_label / cancel_href / cancel_label.
|
||||
#}
|
||||
|
||||
{% set resolved_primary_label = primary_label|default(submit_label|default(null)) %}
|
||||
{% set resolved_secondary_href = secondary_href|default(cancel_href|default(null)) %}
|
||||
{% set resolved_secondary_label = secondary_label|default(cancel_label|default(null)) %}
|
||||
|
||||
<div class="form-container__actions">
|
||||
{% if resolved_primary_label %}
|
||||
<div class="form-container__action">
|
||||
<button type="submit" class="btn btn--primary btn--lg btn--full">{{ resolved_primary_label }}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if resolved_secondary_href and resolved_secondary_label %}
|
||||
<div class="form-container__action">
|
||||
<a href="{{ resolved_secondary_href }}" class="btn btn--secondary btn--lg btn--full">{{ resolved_secondary_label }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user