115 lines
3.5 KiB
Twig
115 lines
3.5 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
{{ form_start(form) }}
|
|
<h1 class="page-header">
|
|
Modification Widget
|
|
</h1>
|
|
|
|
<p>
|
|
{{ form_widget(form.submit) }}
|
|
<a class="btn btn-secondary" href="{{ path('app_'~access~'_page_'~usage~'_view',{id:idpage}) }}">Annuler</a>
|
|
</p>
|
|
|
|
{% if app.session.flashbag.has('error') %}
|
|
<div class='alert alert-danger' style='margin: 5px 0px'>
|
|
<strong>Erreur</strong><br>
|
|
{% for flashMessage in app.session.flashbag.get('error') %}
|
|
{{ flashMessage }}<br>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if app.session.flashbag.has('notice') %}
|
|
<div class='alert alert-info' style='margin: 5px 0px'>
|
|
<strong>Information</strong><br>
|
|
{% for flashMessage in app.session.flashbag.get('notice') %}
|
|
{{ flashMessage }}<br>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-header"><i class="fas fa-pencil-alt fa-fw"></i> Informations</div>
|
|
<div id="col1" class="card-body">
|
|
{{ form_row(form.ckeditor) }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|
|
|
|
{% block localscript %}
|
|
<script>
|
|
$(document).ready(function() {
|
|
$(".control-label").each(function( element ) {
|
|
var loc = $(this).attr('loc');
|
|
if (typeof loc !== typeof undefined && loc !== false) {
|
|
$(this).parent().appendTo("#"+loc);
|
|
}
|
|
});
|
|
|
|
$("#col2").children(".form-group").each(function( element ) {
|
|
$(this).css("zoom","80%");
|
|
});
|
|
|
|
$("#col3").children(".form-group").each(function( element ) {
|
|
$(this).css("zoom","80%");
|
|
});
|
|
|
|
$("#col4").children(".form-group").each(function( element ) {
|
|
$(this).css("zoom","80%");
|
|
});
|
|
|
|
showhide();
|
|
});
|
|
|
|
$("#pagewidget_colorheaderback").bind("change paste keyup", function() {
|
|
$("#diviconsel").css("background-color",$(this).val());
|
|
});
|
|
$("#pagewidget_autoajust").change(function() {
|
|
showhide();
|
|
});
|
|
$("#pagewidget_viewheader").change(function() {
|
|
showhide();
|
|
});
|
|
|
|
function selIcon(idicon,url) {
|
|
$("#pagewidget_idicon").val(idicon);
|
|
$("#diviconsel img").remove();
|
|
|
|
$("#diviconsel").append("<img src='"+url+"'>");
|
|
$("#diviconsel img").attr("height","100px");
|
|
$("#mymodallarge").modal("hide");
|
|
}
|
|
|
|
function delIcon() {
|
|
$("#diviconsel img").remove();
|
|
$("#diviconsel").append("<img src='{{ path("app_minio_image",{file:entity.widget.icon.label}) }}'>");
|
|
$("#diviconsel img").attr("height","100px");
|
|
$("#pagewidget_idicon").val(null);
|
|
}
|
|
|
|
function showhide() {
|
|
if($("#pagewidget_autoajust").val()==1) {
|
|
$("#groupfield_pagewidget_height").hide();
|
|
}
|
|
else {
|
|
$("#groupfield_pagewidget_height").show();
|
|
}
|
|
|
|
if($("#pagewidget_viewheader").val()==1) {
|
|
$("#groupfield_pagewidget_colorheaderback").show();
|
|
$("#groupfield_pagewidget_colorheaderfont").show();
|
|
$("#groupfield_pagewidget_opened").show();
|
|
}
|
|
else {
|
|
$("#groupfield_pagewidget_colorheaderback").hide();
|
|
$("#groupfield_pagewidget_colorheaderfont").hide();
|
|
$("#groupfield_pagewidget_opened").hide();
|
|
$("#pagewidget_opened").val(1);
|
|
}
|
|
}
|
|
</script>
|
|
{% endblock %} |