-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #531 from abhishek-webkul/check-in-document
Allow admin to upload check-in documents
- Loading branch information
Showing
18 changed files
with
947 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{* | ||
* 2007-2017 PrestaShop | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (AFL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author PrestaShop SA <[email protected]> | ||
* @copyright 2007-2017 PrestaShop SA | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
* International Registered Trademark & Property of PrestaShop SA | ||
*} | ||
|
||
{if isset($conf)} | ||
<div class="bootstrap"> | ||
<div class="alert alert-success"> | ||
<button type="button" class="close" data-dismiss="alert">×</button> | ||
{$conf} | ||
</div> | ||
</div> | ||
{/if} | ||
{if isset($errors) && count($errors) && current($errors) != '' && (!isset($disableDefaultErrorOutPut) || $disableDefaultErrorOutPut == false)} | ||
<div class="bootstrap"> | ||
<div class="alert alert-danger"> | ||
<button type="button" class="close" data-dismiss="alert">×</button> | ||
{if count($errors) == 1} | ||
{reset($errors)} | ||
{else } | ||
{l s='%d errors' sprintf=$errors|count} | ||
<br/> | ||
<ol> | ||
{foreach $errors as $error} | ||
<li>{$error}</li> | ||
{/foreach} | ||
</ol> | ||
{/if} | ||
</div> | ||
</div> | ||
{/if} | ||
{if isset($informations) && count($informations) && $informations} | ||
<div class="bootstrap"> | ||
<div class="alert alert-info"> | ||
<button type="button" class="close" data-dismiss="alert">×</button> | ||
<ul id="infos_block" class="list-unstyled"> | ||
{foreach $informations as $info} | ||
<li>{$info}</li> | ||
{/foreach} | ||
</ul> | ||
</div> | ||
</div> | ||
{/if} | ||
{if isset($confirmations) && count($confirmations) && $confirmations} | ||
<div class="bootstrap"> | ||
<div class="alert alert-success" style="display:block;"> | ||
{foreach $confirmations as $conf} | ||
{$conf} | ||
{/foreach} | ||
</div> | ||
</div> | ||
{/if} | ||
{if isset($warnings) && count($warnings)} | ||
<div class="bootstrap"> | ||
<div class="alert alert-warning"> | ||
<button type="button" class="close" data-dismiss="alert">×</button> | ||
{if count($warnings) > 1} | ||
<h4>{l s='There are %d warnings:' sprintf=count($warnings)}</h4> | ||
{/if} | ||
<ul class="list-unstyled"> | ||
{foreach $warnings as $warning} | ||
<li>{$warning}</li> | ||
{/foreach} | ||
</ul> | ||
</div> | ||
</div> | ||
{/if} |
53 changes: 53 additions & 0 deletions
53
admin/themes/default/template/controllers/orders/_booking_document_line.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{** | ||
* 2010-2023 Webkul. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* All right is reserved, | ||
* Please go through LICENSE.txt file inside our module | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this module to newer | ||
* versions in the future. If you wish to customize this module for your | ||
* needs please refer to CustomizationPolicy.txt file inside our module for more information. | ||
* | ||
* @author Webkul IN | ||
* @copyright 2010-2023 Webkul IN | ||
* @license LICENSE.txt | ||
*} | ||
|
||
{if is_array($booking_documents) && count($booking_documents)} | ||
{foreach from=$booking_documents item=booking_document} | ||
<tr> | ||
<td class="text-center"> | ||
<a href="{$link->getAdminLink('AdminBookingDocument')}&action=getDocument&id_document={$booking_document.id_htl_booking_document}&is_preview=1" target="_blank"> | ||
{if $booking_document.file_type == HotelBookingDocument::FILE_TYPE_IMAGE} | ||
<img class="img img-responsive img-thumbnail" src="{$link->getAdminLink('AdminBookingDocument')}&action=getDocument&id_document={$booking_document.id_htl_booking_document}&is_preview=1"> | ||
{elseif $booking_document.file_type == HotelBookingDocument::FILE_TYPE_PDF} | ||
<img class="img img-responsive img-thumbnail" src="{$pdf_icon_link}"> | ||
{/if} | ||
</a> | ||
</td> | ||
<td class="text-left">{$booking_document.title}</td> | ||
<td class="text-center">{dateFormat date=$booking_document.date_add full=1}</td> | ||
<td class="text-center"> | ||
<a class="btn btn-info" href="{$link->getAdminLink('AdminBookingDocument')}&action=getDocument&id_document={$booking_document.id_htl_booking_document}"> | ||
<i class="icon icon-cloud-download"></i> | ||
</a> | ||
<a class="btn btn-danger btn-delete-document" data-id-htl-booking-document="{$booking_document.id_htl_booking_document}"> | ||
<i class="icon icon-trash"></i> | ||
</a> | ||
</td> | ||
</tr> | ||
{/foreach} | ||
{else} | ||
<tr> | ||
<td class="list-empty" colspan="4"> | ||
<div class="list-empty-msg"> | ||
<i class="icon-warning-sign list-empty-icon"></i> | ||
{l s='No documents uploaded yet.'} | ||
</div> | ||
</td> | ||
</tr> | ||
{/if} |
101 changes: 101 additions & 0 deletions
101
admin/themes/default/template/controllers/orders/_booking_documents_modal.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{** | ||
* 2010-2023 Webkul. | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* All right is reserved, | ||
* Please go through LICENSE.txt file inside our module | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this module to newer | ||
* versions in the future. If you wish to customize this module for your | ||
* needs please refer to CustomizationPolicy.txt file inside our module for more information. | ||
* | ||
* @author Webkul IN | ||
* @copyright 2010-2023 Webkul IN | ||
* @license LICENSE.txt | ||
*} | ||
|
||
<div class="modal-body text-center"> | ||
<div class="row"> | ||
<div class="col-lg-12"> | ||
<div class="text-left errors-wrap"></div> | ||
<div class="documents-list"> | ||
<table class="table table-bordered"> | ||
<thead> | ||
<tr> | ||
<th class="text-center">{l s='Preview'}</th> | ||
<th class="text-left">{l s='Title'}</th> | ||
<th class="text-center">{l s='Upload Date'}</th> | ||
<th class="text-center">{l s='Actions'}</th> | ||
</tr> | ||
</thead> | ||
<tbody></tbody> | ||
</table> | ||
</div> | ||
<div class="add-new-document-form" style="margin-top: 10px;"> | ||
<div class="text-left add-new-wrap"> | ||
<a class="btn btn-primary btn-add-new-document"> | ||
{l s='Upload new document'} | ||
</a> | ||
<span></span> | ||
</div> | ||
<form id="form-add-new-document" class="well" method="post" action="#" style="display: none; margin-top: 5px;"> | ||
|
||
<input type="hidden" name="id_htl_booking" value="0"> | ||
|
||
<div class="form-horizontal"> | ||
<div class="form-group"> | ||
<label class="control-label col-sm-2"> | ||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Write the title for the document. Invalid characters <>;=#{}'}"> | ||
{l s='Title'} | ||
</span> | ||
</label> | ||
<div class="col-sm-10"> | ||
<div class="input-group fixed-width-xxl"> | ||
<input type="text" name="title" value="" placeholder="{l s='Eg. Passport, Driving license'}" /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="control-label required col-sm-2"> | ||
<span class="label-tooltip" data-toggle="tooltip" title="" data-original-title="{l s='Choose the document file to be uploaded.'}"> | ||
{l s='File'} | ||
</span> | ||
</label> | ||
<div class="col-sm-10"> | ||
<div class="input-file-wrap"></div> | ||
<div class="input-group fixed-width-xxl"> | ||
<span class="input-group-addon"><i class="icon-file"></i></span> | ||
<input type="text" class="file-name" readonly=""> | ||
<span class="input-group-btn"> | ||
<button type="button" class="btn btn-default btn-add-file"> | ||
<i class="icon-folder-open"></i> | ||
{l s='Add file'} | ||
</button> | ||
</span> | ||
</div> | ||
<p class="text-left" style="margin-top: 4px; font-style: italic;"> | ||
{l s='Upload a PDF or an image file. Allowed image formats: .gif, .jpg, .jpeg and .png'} | ||
</p> | ||
</div> | ||
</div> | ||
<div class="clearfix btn-group-add-new"> | ||
<button class="btn btn-primary pull-right upload" type="submit" name="submitAddPayment"> | ||
{l s='Upload'} | ||
</button> | ||
<button class="btn btn-default pull-left cancel"> | ||
{l s='Cancel'} | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL} | ||
{addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL} | ||
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.