Skip to content

Commit

Permalink
Merge pull request #3 from ujamii/master
Browse files Browse the repository at this point in the history
Compatibility with Neos 5 and preselect of property names in backend module form
  • Loading branch information
danielkestler authored Jan 20, 2021
2 parents 4089875 + a4e827a commit 664a20d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Classes/Controller/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public function uploadAction()

$this->import->flush();

if (isset($args['asset'])) $filePath = $args['asset']['resource']['tmp_name'];
if (isset($args['asset'])) {
$filePath = $_FILES['moduleArguments']['tmp_name']['asset']['resource'];
}

if (isset($filePath)) {
$file = fopen($filePath, 'r');
Expand Down
4 changes: 2 additions & 2 deletions Resources/Private/Templates/Import/Mapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<tr>
<td>{col}</td>
<td>
<f:form.select name="mapping[{iterator.index}]" options="{properties}"></f:form.select>
<f:form.select name="mapping[{iterator.index}]" options="{properties}" value="{col}"/>
</td>
<td>
<f:for each="{data}" as="row" iteration="i">
Expand All @@ -41,7 +41,7 @@
</fieldset>
</div>
<div class="neos-footer">
<f:form.submit class="neos-button neos-button-primary" value="Import data"></f:form.submit>
<f:form.submit class="neos-button neos-button-primary" value="Import data"/>
</div>
</f:form>
</f:section>

0 comments on commit 664a20d

Please sign in to comment.