glpi-project / telemetry

Telemetry & references for your projects
https://glpi-project.github.io/telemetry/
MIT License
6 stars 2 forks source link

Fix modal opening #65

Closed cedric-anne closed 3 years ago

cedric-anne commented 3 years ago

There is an issue, probably related to Twig trimming logic, that breaks the javascript script of the Reference page.

Here is the generated code:


<script type="text/javascript">

$(document).ready(function() {
    $("#countries_select").select2({
        templateSelection: formatState,
        templateResult: formatState,
        placeholder: "Country",
        width: '100%',
        dropdownParent: $('#register_reference')
    });

    $("#filter_country").select2({
        templateSelection: formatState,
        templateResult: formatState,
        width: '100%',
    });

   // if get parameter showmodal is present, show the corresponding modal   $("#register_reference").modal('show');});
</script>    </body>
``

As you can see, `$("#register_reference").modal('show');});` is not output on a new line, and so is considered as a comment.
trasher commented 3 years ago

Manually merged