{% if not included %}
{% extends 'index.html' %}
{% endif %}

{% set included = True %}

{% block content %}

<!-- <h3>Template list</h3> -->


<label for="tpl-list-options" class="col-2 col-form-label">Add template</label>
<div class="col">
  <select id="tpl-list-options" class="form-select">
    <option  selected disabled hidden>
      -- Select a template --
    </option>
    {% for ob in tpl %}
    <option data-index="{{loop.iterator}}" value="{{ob.name}}">
      {{ob.name}}
    </option>
    {% endfor %}
  </select>
</div>
  
  <!-- <section id="tpl-list"> -->
    
  <!-- </section> -->
  
  <script>
  
    
  //  $("#tpl_list_options").change(function(e){
  //      var val = $(this).val()
  //        $.get("/web/templates/"+val,
  //              {included : true},
  //              function(data){
  //                  console.log(data)
  //                  $("#tpl-list").html(data)
  //              })
  //  })
  </script>
  
  {% endblock content %}
