39 lines
1.4 KiB
HTML
39 lines
1.4 KiB
HTML
{*
|
|
A generic image upload form
|
|
|
|
Parameters:
|
|
imageType = Image type (category, product, folder, content, module)
|
|
parentId = Image parent id, ex: category id
|
|
|
|
*}
|
|
|
|
<div class="image-manager" >
|
|
<form action="{url path="/admin/image/type/$imageType/$parentId/save-ajax"}" class="dropzone" id="images-dropzone" enctype="multipart/form-data">
|
|
<div class="fallback">
|
|
<input name="file" type="file" />
|
|
<button type="submit" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-send"></span> {intl l="Send files"}</button>
|
|
</div>
|
|
|
|
<div class="btn-browse hide">
|
|
{intl l="Drop files to upload"}
|
|
<span>Or</span>
|
|
<button type="button" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-upload"></span> {intl l="Browse files"}</button>
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
<div class="existing-image">
|
|
{include file='includes/image-upload-list-ajax.html'}
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
var imageDropZoneUrl = "{url path="/admin/image/type/$imageType/$parentId/save-ajax"}";
|
|
var imageListUrl = "{url path="/admin/image/type/$imageType/$parentId/list-ajax"}";
|
|
var imageReorder = "{url path="/admin/image/type/$imageType/$parentId/update-position"}";
|
|
var imageListErrorMessage = "{intl l='Can\'t load images, please refresh this page.'}";
|
|
var imageReorderErrorMessage = "{intl l='Can\'t reorder images, please refresh this page.'}";
|
|
</script>
|