Working import stock
modifié: core/lib/Thelia/Controller/Admin/ExportController.php modifié: core/lib/Thelia/Controller/Admin/ImportController.php modifié: core/lib/Thelia/Core/Event/ImportExport.php modifié: core/lib/Thelia/Core/Event/TheliaEvents.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/AbstractFormatter.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/Formatter/JsonFormatter.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php modifié: core/lib/Thelia/ImportExport/Import/Type/ProductStockImport.php modifié: templates/backOffice/default/ajax/import-modal.html modifié: templates/backOffice/default/import-page.html
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{form name="thelia.import"}
|
||||
<form action="{$URL}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
<div class="modal fade" id="real-import-modal" tabindex="-1" role="dialog" aria-labelledby="import-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -8,10 +9,14 @@
|
||||
<h4 class="modal-title" id="import-modal-label">Import: {$TITLE}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{custom_render_form_field form=$form field="file_upload"}
|
||||
{form_field form=$form field="file_upload"}
|
||||
<label form="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
|
||||
<input type="file" required aria-required="true" name="{$name}" id="{$label_attr.for}" accept="{$ALLOWED_MIME_TYPES}"/>
|
||||
<div class="small">Accepted formats: {$ALLOWED_EXTENSIONS}</div>
|
||||
{/custom_render_form_field}
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
|
||||
@@ -30,6 +30,14 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $success_message}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-success">{$success_message}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="general-block-decorator">
|
||||
@@ -39,13 +47,17 @@
|
||||
</div>
|
||||
|
||||
<form action="{$URL}" method="post" {form_enctype form=$form}>
|
||||
{custom_render_form_field form=$form field="file_upload"}
|
||||
<input type="file" required aria-required="true" name="{$name}" id="{$label_attr.for}" accept="{$ALLOWED_MIME_TYPES}"/>
|
||||
<div class="small">Accepted formats: {$ALLOWED_EXTENSIONS}</div>
|
||||
{/custom_render_form_field}
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="file_upload"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
<input type="file" required aria-required="true" name="{$name}" id="{$label_attr.for}" accept="{$ALLOWED_MIME_TYPES}"/>
|
||||
<div class="small">Accepted formats: {$ALLOWED_EXTENSIONS}</div>
|
||||
{/form_field}
|
||||
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user