0byt3m1n1
Path:
/
home
/
mgatv524
/
www
/
avenida
/
views
/
[
Home
]
File: dataset-data-form-add.twig
{# /* * Spring Signage Ltd - http://www.springsignage.com * Copyright (C) 2015 Spring Signage Ltd * (${FILE_NAME}) */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% block formTitle %} {% trans "Add Data" %} {% endblock %} {% block formButtons %} {% trans "Cancel" %}, XiboDialogClose() {% trans "Next" %}, XiboDialogApply("#dataSetDataAdd") {% trans "Save" %}, $("#dataSetDataAdd").submit() {% endblock %} {% block callBack %}dataSetDataEntryOpen{% endblock %} {% block formHtml %} <div class="row"> <div class="col-md-12"> <form id="dataSetDataAdd" class="XiboForm form-horizontal" method="post" action="{{ urlFor("dataSet.data.add", {id: dataSet.dataSetId}) }}"> {% for col in dataSet.getColumn() %} {% if col.dataSetColumnTypeId == 1 or col.dataSetColumnTypeId == 3 %} {% set fieldId = "dataSetColumnId_#{col.dataSetColumnId}" %} {# Field depending on what data type we have #} {% if col.dataTypeId == 2 %} {{ forms.number(fieldId, col.heading) }} {% elseif col.dataTypeId == 3 %} {{ forms.dateTime(fieldId, col.heading) }} {% elseif col.dataTypeId == 5 %} {% set attributes = [ { name: "data-live-search", value: "true" }, { name: "data-selected-text-format", value: "count > 4" } ] %} {{ forms.dropdown(fieldId, "single", col.heading, "", [{mediaId: null, name: ""}]|merge(images), "mediaId", "name", "", "", "", "", "", attributes) }} {% elseif col.listContent != "" %} {{ forms.dropdown(fieldId, "single", col.heading, heading, [""]|merge(col.listContentArray())) }} {% else %} {{ forms.input(fieldId, col.heading) }} {% endif %} {% endif %} {% endfor %} </form> </div> </div> {% endblock %}