Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -3,28 +3,29 @@
|
||||
{% endif %}
|
||||
{% set _back = back is defined and back is not same as (false) ? back : false %}
|
||||
{% set _reset = reset is defined and reset is same as (false) ? false : true %}
|
||||
<div class="box box-primary">
|
||||
<div class="card mb-3">
|
||||
{% block form_before %}{% endblock %}
|
||||
{{ form_start(form, formStartOptions|default({})) }}
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
{{ title }}
|
||||
{% if form.vars.docu_chapter is defined and form.vars.docu_chapter is not empty %}
|
||||
<a href="{{ form.vars.docu_chapter|docu_link }}" target="_blank"><i class="{{ 'help'|icon }}"></i></a>
|
||||
<a class="form-help" href="{{ form.vars.docu_chapter|docu_link }}" target="_blank">?</a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="card-body">
|
||||
{{ form_errors(form) }}
|
||||
{% block form_body %}
|
||||
{{ form_widget(form) }}
|
||||
{{ form_rest(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="card-footer">
|
||||
{% block submit_button %}
|
||||
<input type="submit" data-loading-text="{{ (submit_button|default('action.save'))|trans }}…" value="{{ (submit_button|default('action.save'))|trans }}" class="btn btn-primary" />
|
||||
{% endblock %}
|
||||
{% if _back is not same as (false) %}
|
||||
<a href="{{ _back }}" class="btn btn-link">{{ 'action.back'|trans }}</a>
|
||||
<a href="{{ _back }}" class="btn btn-link">{{ 'back'|trans({}, 'actions') }}</a>
|
||||
{% endif %}
|
||||
{% if _reset is not same as (false) %}
|
||||
<input type="reset" value="{{ 'action.reset'|trans }}" class="btn btn-link pull-right" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'boxtype': 'danger'} %}
|
||||
{% embed '@theme/embeds/card.html.twig' with {'boxtype': 'danger'} %}
|
||||
{% block box_before %}
|
||||
{{ form_start(form) }}
|
||||
{% endblock %}
|
||||
@@ -9,7 +9,7 @@
|
||||
{% block form_body %}
|
||||
{% if used is same as (false) %}
|
||||
{{ 'delete.not_in_use'|trans }}
|
||||
<div class="hidden">
|
||||
<div class="d-none">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
{% else %}
|
||||
@@ -19,9 +19,9 @@
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
{% block box_footer %}
|
||||
<input type="submit" value="{{ 'action.delete'|trans }}" class="btn btn-danger" />
|
||||
<input type="submit" value="{{ 'delete'|trans }}" class="btn btn-danger" />
|
||||
{% if back %}
|
||||
<a href="{{ back }}" class="btn btn-link">{{ 'action.back'|trans }}</a>
|
||||
<a href="{{ back }}" class="btn btn-link">{{ 'back'|trans({}, 'actions') }}</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block box_after %}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{% embed 'embeds/modal.html.twig' %}
|
||||
{% embed '@theme/embeds/modal.html.twig' %}
|
||||
{% set used = used|default(false) %}
|
||||
{% block modal_id %}form_modal{% endblock %}
|
||||
{% block modal_class %}{% if used %}modal-danger{% endif %}{% endblock %}
|
||||
{% block modal_before %}{{ form_start(form) }}{% endblock %}
|
||||
{% block modal_title %}
|
||||
{{ title|default('confirm.delete'|trans) }}
|
||||
@@ -9,7 +8,7 @@
|
||||
{% block modal_body %}
|
||||
{% if used is same as (false) %}
|
||||
{{ 'delete.not_in_use'|trans }}
|
||||
<div class="hidden">
|
||||
<div class="d-none">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
{% else %}
|
||||
@@ -18,8 +17,8 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block modal_footer %}
|
||||
<button type="submit" class="btn {% if used %}btn-outline{% else %}btn-primary{% endif %} pull-left modal-form-save" data-loading-text="{{ 'action.delete'|trans }}..." id="{{ block('modal_id') }}_save">{{ 'action.delete'|trans }}</button>
|
||||
<button type="button" class="btn btn-default btn-cancel" data-dismiss="modal">{{ 'action.close'|trans }}</button>
|
||||
<button type="submit" class="btn {% if used %}btn-danger{% else %}btn-primary{% endif %} pull-left modal-form-save" data-loading-text="{{ 'delete'|trans }}..." id="{{ block('modal_id') }}_save">{{ 'delete'|trans }}</button>
|
||||
<button type="button" class="btn btn-cancel" data-bs-dismiss="modal">{{ 'action.close'|trans }}</button>
|
||||
{% endblock %}
|
||||
{% block modal_end %}{{ form_end(form) }}{% endblock %}
|
||||
{% endembed %}
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
{#
|
||||
REQUIRED CHANGES NEED TO BE DONE IN THESE FILES:
|
||||
- embeds/modal.html.twig
|
||||
- default/_form_modal.html.twig
|
||||
#}
|
||||
<div class="modal {% block modal_class %}{% endblock %}" id="{% block modal_id %}form_modal{% endblock %}" tabindex="-1" role="dialog" aria-labelledby="{{ block('modal_id') }}_label">
|
||||
<div class="modal modal-blur fade {% block modal_class %}{% endblock %}" id="{% block modal_id %}form_modal{% endblock %}" tabindex="-1" role="dialog" aria-labelledby="{{ block('modal_id') }}_label">
|
||||
<div class="modal-dialog {% block modal_size %}modal-lg{% endblock %}" role="document">
|
||||
<div class="modal-content">
|
||||
{% block form_before %}{% endblock %}
|
||||
{% block modal_before %}{{ form_start(form, formStartOptions|default({})) }}{% endblock %}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'action.close'|trans }}"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="{{ block('modal_id') }}_label">
|
||||
<h5 class="modal-title" id="{{ block('modal_id') }}_label">
|
||||
{% block modal_title %}
|
||||
{{ title }}
|
||||
{% if form.vars.docu_chapter is defined and form.vars.docu_chapter is not empty %}
|
||||
<a href="{{ form.vars.docu_chapter|docu_link }}" target="_blank"><i class="{{ 'help'|icon }}"></i></a>
|
||||
<a class="form-help" href="{{ form.vars.docu_chapter|docu_link }}" target="_blank">?</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</h4>
|
||||
</h5>
|
||||
<button type="button" class="btn-close{% if tabler_bundle.isDarkMode() %} btn-close-white{% endif %}" data-bs-dismiss="modal" aria-label="{{ 'action.close'|trans }}"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% block modal_body %}
|
||||
{{ form_errors(form) }}
|
||||
{% block form_body %}
|
||||
{{ form_widget(form) }}
|
||||
{{ form_rest(form) }}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{% block modal_footer %}
|
||||
{% block submit_button %}
|
||||
<button type="submit" class="btn btn-primary pull-left modal-form-save" data-loading-text="{{ (submit_button|default('action.save'))|trans }}…" id="{{ block('modal_id') }}_save">{{ (submit_button|default('action.save'))|trans }}</button>
|
||||
<button type="submit" class="btn btn-primary pull-left modal-form-save" data-loading-text="{{ (submit_button|default('action.save'))|trans }}…" id="{{ block('modal_id') }}_save" data-hotkey="ctrl+Enter">{{ (submit_button|default('action.save'))|trans }}</button>
|
||||
{% endblock %}
|
||||
<button type="button" class="btn btn-default btn-cancel" data-dismiss="modal">{{ 'action.close'|trans }}</button>
|
||||
<button type="button" class="btn btn-cancel" data-bs-dismiss="modal">{{ 'action.close'|trans }}</button>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block modal_end %}{{ form_end(form) }}{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user