Add language in import and export form, with handle by FormatterData
modifié: core/lib/Thelia/Controller/Admin/ExportController.php modifié: core/lib/Thelia/Controller/Admin/ImportController.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php modifié: core/lib/Thelia/Form/ExportForm.php modifié: core/lib/Thelia/Form/ImportForm.php modifié: templates/backOffice/default/ajax/export-modal.html modifié: templates/backOffice/default/ajax/import-modal.html modifié: templates/backOffice/default/export-page.html modifié: templates/backOffice/default/import-page.html
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="col-md-12">
|
||||
{ifloop rel="export-formatters"}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="formatter"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
@@ -27,7 +27,20 @@
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="export-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="do_compress"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
|
||||
@@ -9,14 +9,32 @@
|
||||
<h4 class="modal-title" id="import-modal-label">Import: {$TITLE}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{form_field form=$form field="file_upload"}
|
||||
<label form="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="import-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{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>
|
||||
{/form_field}
|
||||
<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}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="col-md-12">
|
||||
{ifloop rel="export-formatters"}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="formatter"}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}">
|
||||
@@ -64,7 +64,19 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="export-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{form_field form=$form field="do_compress"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
|
||||
@@ -48,15 +48,32 @@
|
||||
|
||||
<form action="{$URL}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="file_upload"}
|
||||
<label for="{$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>
|
||||
{/form_field}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{form_field form=$form field="language"}
|
||||
<label for="{$label_attr.for}">
|
||||
{$label}
|
||||
</label>
|
||||
<select id="{$label_attr.for}" name="{$name}" required>
|
||||
{loop name="import-lang" type="lang"}
|
||||
<option value="{$ID}" {if $ID == $CURRENT_LANG_ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{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>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" title="{intl l="Import this file"}">{intl l="Import this file"}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user