芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/sommatv/views/dataset-data-form-edit.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 "Edit Data" %} {% endblock %} {% block formButtons %} {% trans "Delete" %}, XiboSwapDialog("{{ urlFor("dataSet.data.delete.form", {id: dataSet.dataSetId, rowId: row.id}) }}") {% trans "Cancel" %}, XiboDialogClose() {% trans "Save" %}, $("#dataSetEditData").submit() {% endblock %} {% block callBack %}dataSetDataEntryOpen{% endblock %} {% block formHtml %}
{% for col in dataSet.getColumn() %} {% if col.dataSetColumnTypeId == 1 or col.dataSetColumnTypeId == 3 %} {% set fieldId = "dataSetColumnId_#{col.dataSetColumnId}" %} {% set heading = attribute(row, col.heading) %} {# Field depending on what data type we have #} {% if col.dataTypeId == 2 %} {{ forms.number(fieldId, col.heading, heading) }} {% elseif col.dataTypeId == 3 %} {{ forms.dateTime(fieldId, col.heading, 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, 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, heading) }} {% endif %} {% endif %} {% endfor %}
{% endblock %}