310 lignes
18 KiB
Twig
310 lignes
18 KiB
Twig
{% include "headitem.html.twig" with {title: "GENERAL_ADMIN_TITLE"|translate, box: "box"} %}
|
|
{{ style({ include: oViewConf.getModuleUrl('d3modcfg_lib', 'out/admin/src/d3_mod_cfg.min.css') }) }}
|
|
{{ style() }}
|
|
{% include "@d3importer/admin/errormessages.html.twig" %}
|
|
{% if readonly %}
|
|
{% set readonly = "readonly disabled" %}
|
|
{% else %}
|
|
{% set readonly = "" %}
|
|
{% endif %}
|
|
|
|
<script type="text/javascript">
|
|
<!--
|
|
{% if updatelist == 1 %}
|
|
UpdateList('{{ oxid }}');
|
|
{% endif %}
|
|
function UpdateList(sID) {
|
|
var oSearch = parent.list.document.getElementById("search");
|
|
oSearch.oxid.value = sID;
|
|
oSearch.submit();
|
|
}
|
|
//-->
|
|
</script>
|
|
|
|
<form name="transfer" id="transfer" action="{{ oViewConf.getSelfLink()|raw }}" method="post">
|
|
{{ oViewConf.getHiddenSid()|raw }}
|
|
<input type="hidden" name="oxid" value="{{ oxid }}">
|
|
<input type="hidden" name="cl" value="{{ oViewConf.getActiveClassName() }}">
|
|
<input type="hidden" name="editlanguage" value="{{ editlanguage }}">
|
|
</form>
|
|
|
|
<form name="myedit" id="myedit" enctype="multipart/form-data" action="{{ oViewConf.getSelfLink()|raw }}" method="post">
|
|
{{ oViewConf.getHiddenSid()|raw }}
|
|
<input type="hidden" name="cl" value="{{ oViewConf.getActiveClassName() }}">
|
|
<input type="hidden" name="fnc" value="">
|
|
<input type="hidden" name="oxid" value="{{ oxid }}">
|
|
<input type="hidden" name="editval[d3importconfig__oxid]" value="{{ oxid }}">
|
|
|
|
{% if hasReachedProfileLimit %}
|
|
<div class="extension_warning">
|
|
{{ translate({ ident: "D3_IMPORTER_NOTICE_PROFILELIMITREACHED" }) }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<table border="0" width="98%" style="border-collapse: collapse">
|
|
|
|
{% if isfailupload %}
|
|
<tr>
|
|
<td valign="top" class="edittext" colspan="2">
|
|
<div class="errorbox">{{ translate({ ident: "D3_IMPORTER_FAILUPLOAD_"|cat(isfailupload) }) }}</div>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<td style="vertical-align: top">
|
|
<table>
|
|
{% block d3_d3importer_views_admin_tpl_d3_importer_main_leftside %}
|
|
{% if oxid != " - 1" %}
|
|
<tr>
|
|
<td class="edittext" width="70" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_OXID" }) }}
|
|
</td>
|
|
<td class="edittext">
|
|
{{ edit.getId() }}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<td class="edittext" width="70" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_DESCRIPTION" }) }}
|
|
</td>
|
|
<td class="edittext">
|
|
<input type="text"
|
|
size="45"
|
|
maxlength="{{ edit.d3importconfig__oxtitle.fldmax_length }}"
|
|
name="editval[d3importconfig__oxtitle]"
|
|
value="{{ edit.d3importconfig__oxtitle.value }}" {{ readonly }}>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext" width="100" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_IMPORTFILE" }) }}
|
|
</td>
|
|
<td class="edittext">
|
|
<select name="xmlval[FILE]" {{ readonly }}>
|
|
<option value="">{{ translate({ ident: "D3_IMPORTER_MAIN_NOFILE" }) }}</option>
|
|
{% for file in aImportedFiles %}
|
|
<option value="{{ file }}"
|
|
{% if file == aProfile.FILE|url_encode %}SELECTED{% endif %}>{{ file }}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext" width="70" valign="top" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_NEWFILE", args: oView.getFormattedMaxUploadFileSize() }) }}
|
|
{% include "inputhelp.html.twig" with {'sHelpId': help_id("D3_IMPORTER_MAIN_ALLOWEXT_MAXFILESIZE_HELP"), 'sHelpText': help_text("D3_IMPORTER_MAIN_ALLOWEXT_MAXFILESIZE_HELP")} %}
|
|
</td>
|
|
<td class="edittext">
|
|
<input type="file"
|
|
size="40"
|
|
maxlength="255"
|
|
name="newuploadfile"
|
|
id="newuploadfile"
|
|
{{ readonly }}
|
|
>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext" width="70" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_COLSEP" }) }}
|
|
{% include "inputhelp.html.twig" with {'sHelpId': help_id("D3_IMPORTER_MAIN_COLSEPDESCRIPTION_HELP"), 'sHelpText': help_text("D3_IMPORTER_MAIN_COLSEPDESCRIPTION_HELP")} %}
|
|
</td>
|
|
<td class="edittext">
|
|
<input type="text" size="3" maxlength="1"
|
|
name="xmlval[FILESEPARATOR]"
|
|
value="{{ aProfile.FILESEPARATOR }}" {{ readonly }}>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext" width="70" nowrap>
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_TEXTSEP" }) }}
|
|
{% include "inputhelp.html.twig" with {'sHelpId': help_id("D3_IMPORTER_MAIN_TEXTSEPDESCRIPTION_HELP"), 'sHelpText': help_text("D3_IMPORTER_MAIN_TEXTSEPDESCRIPTION_HELP")} %}
|
|
</td>
|
|
<td class="edittext">
|
|
<input type="text" size="3" maxlength="1"
|
|
name="xmlval[TEXTSEPARATOR]"
|
|
value={% if aProfile.TEXTSEPARATOR == '"' %}'{{ aProfile.TEXTSEPARATOR }}'{% else %}"{{ aProfile.TEXTSEPARATOR }}"{% endif %} {{ readonly }}
|
|
>
|
|
</td>
|
|
</tr>
|
|
{% endblock %}
|
|
<tr>
|
|
<td class="edittext"></td>
|
|
<td class="edittext"><br>
|
|
<span class="d3modcfg_btn fixed icon d3color-green">
|
|
<button type="submit" class="edittext" name="saveImportProfile"
|
|
onClick="document.myedit.fnc.value='saveImportProfile'" {{ readonly }}>
|
|
<i class="fa fa-check-circle fa-inverse"></i>{{ translate({ ident: "GENERAL_SAVE" }) }}
|
|
</button>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<!-- Anfang rechte Seite -->
|
|
<td valign="top" class="edittext" align="left" width="50%">
|
|
{% if oxid != " - 1" and not isfailupload %}
|
|
{% if aFileInfo and aProfile.FILE|url_encode %}
|
|
<table cellspacing="0" cellpadding="0" border="0">
|
|
{% block d3_d3importer_views_admin_tpl_d3_importer_main_rightside %}
|
|
<tr>
|
|
<td class="edittext">
|
|
<span style="font-weight: bold">
|
|
{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_HEAD" }) }}:
|
|
</span><br><br>
|
|
<table cellpadding="2" style="border: 1px solid black; padding: 5px">
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_NAME" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">
|
|
<a class="edittext"
|
|
style="text-decoration:underline; color: blue"
|
|
href="{{ oViewConf.getBaseDir() }}import/{{ aFileInfo.name }}"
|
|
target="_blank">{{ aFileInfo.name }}</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_SIZE" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.size|replace({".": ","}) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_CHANGE" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.modify|date("d.m.Y H:i:s") }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_READ" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">
|
|
{% if aFileInfo.is_read %}
|
|
<span style="color:green">ja</span>
|
|
{% else %}
|
|
<span style="color:red">nein</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_WRITE" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">
|
|
{% if aFileInfo.is_write %}
|
|
<span style="color:green">ja</span>
|
|
{% else %}
|
|
<span style="color:red">nein</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext"> </td>
|
|
</tr>
|
|
{% if aFileInfo.is_csv %}
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_CSV" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext"><span style="color:green">ja</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_ROWS" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.lines }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_COLUMS" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.colums }} (bei Seperator
|
|
"{{ aFileInfo.seperator }}")
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_CSV" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext"><span style="color:red">unbekannt</span></td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<td class="edittext"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_RIGHTS" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.permission }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_OWNER" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.owner.name }} ({{ aFileInfo.owner.uid }}
|
|
)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="edittext">{{ translate({ ident: "D3_IMPORTER_MAIN_FIFELINFO_GROUP" }) }}
|
|
:
|
|
</td>
|
|
<td class="edittext">{{ aFileInfo.group.name }} ({{ aFileInfo.group.uid }}
|
|
)
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
{% endblock %}
|
|
</table>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
{% if oxid != " - 1" %}
|
|
<form name="export" id="export" action="{{ oViewConf.getSelfLink()|raw }}" method="post">
|
|
{{ oViewConf.getHiddenSid()|raw }}
|
|
<input type="hidden" name="cl" value="{{ oViewConf.getActiveClassName() }}">
|
|
<input type="hidden" name="fnc" value="exportConfig">
|
|
<input type="hidden" name="oxid" value="{{ oxid }}">
|
|
<input type="hidden" name="sProfileName" value="{{ edit.d3importconfig__oxtitle.value }}">
|
|
<span class="d3modcfg_btn fixed icon action_download">
|
|
<input type="submit" value="{{ translate({ ident: "D3_IMPORTER_EXPORTCONFIG" }) }}">
|
|
<span></span>
|
|
</span>
|
|
</form>
|
|
{% endif %}
|
|
|
|
{% set javaScript %}{% apply spaceless %}
|
|
document.getElementById("newuploadfile").addEventListener("change", function (e) {
|
|
var count=1;
|
|
var files = e.currentTarget.files;
|
|
|
|
for (var x in files) {
|
|
var filesize = files[x].size;
|
|
let filename = files[x].name;
|
|
var maxfilesize = '{{ oView.getFormattedMaxUploadFileSize() }}';
|
|
|
|
if (filename !== "item" && typeof filename !== "undefined" && filesize !== "undefined" && filesize > {{ oView.getSmallestSystemUploadRestrictions() }}) {
|
|
alert(`{{ translate({ ident: "D3_IMPORTER_MAIN_EXCEEDS_MAXFILESIZE" }) }}`);
|
|
}
|
|
}
|
|
|
|
});
|
|
{% endapply %}{% endset %}
|
|
|
|
{{ script({ add: javaScript.__toString(), dynamic: __oxid_include_dynamic }) }}
|
|
|
|
{% include "bottomnaviitem.html.twig" %}
|
|
{% include "bottomitem.html.twig" %}
|