Try fix template modal

This commit is contained in:
James Musselman 2023-11-30 12:16:20 -06:00
parent bcc9135851
commit 6497dfae89

View file

@ -162,6 +162,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-12">
<div id="template-modal" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title">Templates</h2>
</div>
<div class="modal-body">
<!-- Generate buttons for each template -->
{{ range .Templates }}
<button type="button" class="btn p-2 btn-primary"
onclick="redirectToTemplate('/edit?filename={{.Filename}}&template={{.TemplateName}}')">
{{.TemplateName}}
</button> <br>
{{ end }}
</div>
</div>
</div>
</div>
</div>
<script> <script>
// The deletion is kept here as I (Musselman) have not found a way to implement the {{.Filename}} into the javascript. // The deletion is kept here as I (Musselman) have not found a way to implement the {{.Filename}} into the javascript.