This commit is contained in:
Xes
2025-08-14 22:41:49 +02:00
parent 2de81ccc46
commit 8ce45119b6
39774 changed files with 4309466 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% for type in sonata_flashmessages_types() %}
{% set domain = domain is defined ? domain : null %}
{% for message in sonata_flashmessages_get(type, domain) %}
<div class="alert alert-{{ type|sonata_status_class }} alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ message|raw }}
</div>
{% endfor %}
{% endfor %}

View File

@@ -0,0 +1,15 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block sonata_type_color_widget %}
{% spaceless %}
<input type="color" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}/>
{% endspaceless %}
{% endblock sonata_type_color_widget %}

View File

@@ -0,0 +1,33 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block sonata_type_color_selector_widget %}
{{ block('choice_widget') }}
{% spaceless %}
<script type="text/javascript">
jQuery(function ($) {
var select2FormatColorSelect = function format(state) {
if (!state.id || state.disabled) {
return state.text;
}
return ' <i class="fa fa-square" style="color: '+ state.id +'"></i> ' + state.text;
};
$('#{{ id }}').select2({
formatResult: select2FormatColorSelect,
formatSelection: select2FormatColorSelect,
width: '100%',
escapeMarkup: function(m) { return m; }
});
});
</script>
{% endspaceless %}
{% endblock sonata_type_color_selector_widget %}

View File

@@ -0,0 +1,67 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% block sonata_type_date_picker_widget_html %}
{% if datepicker_use_button %}
<div class='input-group date' id='dp_{{ id }}'>
{% endif %}
{% set attr = attr|merge({'data-date-format': moment_format}) %}
{{ block('date_widget') }}
{% if datepicker_use_button %}
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
</div>
{% endif %}
{% endblock sonata_type_date_picker_widget_html %}
{% block sonata_type_date_picker_widget %}
{% spaceless %}
{% if wrap_fields_with_addons %}
<div class="input-group">
{{ block('sonata_type_date_picker_widget_html') }}
</div>
{% else %}
{{ block('sonata_type_date_picker_widget_html') }}
{% endif %}
<script type="text/javascript">
jQuery(function ($) {
$('#{{ datepicker_use_button ? 'dp_' : '' }}{{ id }}').datetimepicker({{ dp_options|json_encode|raw }});
});
</script>
{% endspaceless %}
{% endblock sonata_type_date_picker_widget %}
{% block sonata_type_datetime_picker_widget_html %}
{% if datepicker_use_button %}
<div class='input-group date' id='dtp_{{ id }}'>
{% endif %}
{% set attr = attr|merge({'data-date-format': moment_format}) %}
{{ block('datetime_widget') }}
{% if datepicker_use_button %}
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
</div>
{% endif %}
{% endblock sonata_type_datetime_picker_widget_html %}
{% block sonata_type_datetime_picker_widget %}
{% spaceless %}
{% if wrap_fields_with_addons %}
<div class="input-group">
{{ block('sonata_type_datetime_picker_widget_html') }}
</div>
{% else %}
{{ block('sonata_type_datetime_picker_widget_html') }}
{% endif %}
<script type="text/javascript">
jQuery(function ($) {
$('#{{ datepicker_use_button ? 'dtp_' : '' }}{{ id }}').datetimepicker({{ dp_options|json_encode|raw }});
});
</script>
{% endspaceless %}
{% endblock sonata_type_datetime_picker_widget %}