{# # This file is part of MedShakeEHR. # # Copyright (c) 2017 # Bertrand Boutillier # http://www.medshake.net # # MedShakeEHR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # MedShakeEHR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with MedShakeEHR. If not, see . #/ /## # Template > Config : édition d'un formulaire # # @author Bertrand Boutillier # @contrib fr33z00 #} {% extends "page.html.twig" %} {% import "macroForm.html.twig" as f %} {% block title %}{{ config.designAppName }} : configuration{% endblock %} {% block head %} {{ parent() }} {% endblock %} {% block jsEmbed %} {{ parent() }} function refreshFormPreview() { $.ajax({ url: urlBase + "/configuration/ajax/configFormPreview/", type: 'post', data: { formID: $('#formID').text(), }, dataType: "json", success: function(data) { $('#formPreview').html(data.htmlFormPreview); {# prévenir les problèmes car le form est inclus entre les balises form pour l'édition #} $('#formPreview').find('input, select, textarea').removeAttr('required'); $('#formPreview').find('input, select, textarea').removeAttr('name'); $('#formPreview').find('input, select, textarea').removeAttr('id'); $('#formPreview').find('input, select, textarea').removeAttr('value'); $('#basicTemplateCode').val(data.basicTemplateCode); $('#sqlGen').val(data.sqlGen); $('#sqlGenUpdate').val(data.sqlGenUpdate); }, error: function() { alert_popup("danger", 'Problème, rechargez la page !'); } }); } $(document).ready(function() { refreshFormPreview(); $("button.formDataSave").on("click", function(e) { setTimeout(refreshFormPreview, 500); }); }); {% endblock %} {% block body %}

Edition du formulaire #{{ page.form.id }} - {{ page.form.name }}

{% endblock %}