<% if(it.layout_clean_mode) {%>
<% layout("../layouts/admin/Clean") %>
<% } else {%>
<% layout("../layouts/admin/Main") %>
<%}%>



<%~ includeFile("../partials/admin/Breadcrumb", it)%>


<div class="tab-content mx-4 my-4">
  <div class="row">
    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
      <%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
      <div class="form-container card p-4">
        <h5 class="primaryHeading2 mb-4 text-md-left pl-3">
          <%= it.heading %>
        </h5>

        <form action="/admin/actives-add" method="POST">


          <div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
            <label for="name" class="control-label">Name</label>


            <input type="text" required class="form-control data-input" id="text_name" name="name" value="<%= it.form_fields['name'] %>" />


          </div>

          <div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
            <label for="handle" class="control-label">Handle</label>

            <small class="text-muted">This is used to create the qrcode.</small>
            <input type="text" required class="form-control data-input" id="text_handle" name="handle" value="<%= it.form_fields['handle'] %>" />


          </div>

          <div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
            <label for="description" class="control-label">Description</label>


            <input type="text" required class="form-control data-input" id="text_description" name="description" value="<%= it.form_fields['description'] %>" />


          </div>

          <div class="d-flex flex-wrap mb-5">
            <% it.output_variables?.forEach(oVar => { %>
            <div class="form-group col-lg-3 col-md-5 col-12" style="max-width: 311px;">
              <label for="<%= oVar.name.replace(/ /g,"_")+'_id' %>" class="control-label"><%= oVar.name %></label>
              <input type="number" class="form-control data-input weight-active-score" id="<%= oVar.name.replace(/ /g,"_")+'_id' %>" oninput="weightScoreInputChange(this, event)" name="<%= oVar.name %>" />
            </div>
            <% }) %>

          </div>

          <div class="form-group pl-3">
            <button type="submit" class="btn btn-primary">Submit</button>
          </div>
        </form>

      </div>
    </div>
  </div>
</div>