{*
* 2007-2020 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 license@buy-addons.com 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    Buy-addons    <contact@buy-addons.com>
* @copyright 2007-2020 Buy-addons
* @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<script>
    var token_askaquotemodule = '{$token_askaquotemodule nofilter}'; {* no escape necessary *}
	var demo_mod = "{$demo_mod|escape:'htmlall':'UTF-8'}";
</script>
<div class="alert alert-success show_message" >
    {l s='Delete' mod='askforaquotemodul'}<strong> {l s='Success!' mod='askforaquotemodul'}</strong>.
</div>
<div class="alert alert-warning show_warning" >
    {l s='Settings' mod='askforaquotemodul'}<strong> {l s='Empty!' mod='askforaquotemodul'}</strong>.
</div>
<div class="bootstrap">
    <div class="module_error alert alert-danger show_demoMod">
        {l s='You are use ' mod='askforaquotemodul'}
        <strong>{l s='Demo Mode ' mod='askforaquotemodul'}</strong>
        {l s=', so some buttons, functions will be disabled because of security. ' mod='askforaquotemodul'}
        {l s='You can use them in Live mode after you puchase our module. ' mod='askforaquotemodul'}
        {l s='Thanks !' mod='askforaquotemodul'}
    </div>
    <div id="error_email" style="display:none;" class="alert alert-danger"><span>Email is not a valid email address</div>
</div>
<ul class="nav nav-tabs">
    <li class="{if $task_menu|escape:'htmlall':'UTF-8' =="Quote"}active{/if}">
        <a href="{$link_module|escape:'htmlall':'UTF-8'}&task=Quote">{l s='Quote' mod='askforaquotemodul'}</a>
    </li>
    <li class="{if $task_menu|escape:'htmlall':'UTF-8' =="Email"}active{/if}">
        <a href="{$link_module|escape:'htmlall':'UTF-8'}&task=Email">{l s='Templates' mod='askforaquotemodul'}</a>
    </li>
    <li class="{if $task_menu|escape:'htmlall':'UTF-8' =="Settings"}active{/if}">
        <a href="{$link_module|escape:'htmlall':'UTF-8'}&task=Settings">{l s='Setting' mod='askforaquotemodul'}</a>
    </li>
</ul>

<div class="ba_newsletter_popup_background" style=""></div>
<div class = "panel" id="td_add_new_quote" style = "border-radius: 0px 5px 5px 5px; display:block;">
<form method="POST" action="">   
   <div class = "panel-heading">
        <i class = "fa fa-calculator"></i> <label>{l s='Quote' mod='askforaquotemodul'}</label>
    </div>
    <div class="ba_newsletter_popup_background" style=""></div>
   <div style="padding-bottom: 10px;display: -webkit-box;display: -webkit-inline-flex;display: -ms-inline-flexbox;display:inline-flex;width: 100%;">
        <div class="td_customer_admin" method="POST" action="" >
            <div class = "panel">
                <div class = "panel-heading ">
                    <div style="float:left;padding-right: 5px;position:relative;">
                        <i class = "icon-user"></i> <label>{l s='Customer' mod='askforaquotemodul'}:</label>
                        <div class="col-lg-6" id="select_cus" style="position:absolute;top:-3px;left:136px;">
                            <a class="fancybox_customer btn btn-default td_add_new_customer">
                                <i class="icon-plus-sign-alt"></i>
                            {l s='Add customer' mod='askforaquotemodul'}    
                            </a>
                        </div>
                        <div id="td_background_popup_newcus" style="display:none;">
                            <div id="td_new_cus">
                                <div style="background-color: #fff;border: solid 1px #d3d8db;border-radius: 5px;height: 120px;margin: 10px 11px 0px 10px;">
                                    <label class="control-label col-lg-3" style="padding-left: 15px;padding-top: 10px;width: 30%;">
                                        <span title="" data-toggle="tooltip" class="label-tooltip">
                                        {l s='Search for a customer:' mod='askforaquotemodul'}    
                                        </span>
                                    </label>
                                    <div class="col-lg-9" style="padding-top: 10px;width: 70%;padding-left: 45px;">
                                        <div class="row">
                                            <div class="col-lg-6">
                                                <div class="input-group">
                                                    <input type="text" id="search_customer" value="">
                                                    <span class="input-group-addon" onClick="searchcustomer()">
														<span class="loadicon_searchcus" style="display: none"><i class="icon-refresh icon-spin"></i></span>
                                                        <i class="icon-search"></i>
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="select_customer" style="display:none;width:100%;float:left;">
                                        <label class="control-label col-lg-3" style="padding-left: 15px;padding-top: 10px;float:left;width: 30%;">
                                            <span title="" data-toggle="tooltip" class="label-tooltip">{l s='Select a Customer' mod='askforaquotemodul'}:</span>
                                        </label>
                                        <div id="img_loading_gif" style="float: left;padding-left: 48px;padding-top: 10px;"><img class = "img_loading" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
                                    </div> 
                                    <div class="button_choose" align="center"><button type="button" id="td_choose" style="display:none;" class="setup-customer btn btn-default pull-right">
                                    <i class="icon-arrow-right"></i> {l s='Choose' mod='askforaquotemodul'}</button></div>
                                    <div class="row" style="position: absolute;width: 91%;top: 60px;left: 30px;">
                                        <div id="alert_customer" style="display:none;"><div class="alert alert-warning"><i class="icon-warning-sign"></i>&nbsp;{l s='No customers found' mod='askforaquotemodul'}</div></div>
                                    </div>
                                </div>
                                <span class="td_close_new_cus"><a title="Close" class="fancybox-close exit_popup" href="javascript:;"></a></span>
                            </div>
                        </div>
                    </div>
                    <div class="td_customer_newquote" style="float:left;"><input class="td_id_customer" id="td_id_customerr" type="hidden" name="infor_quote[id_customer]" value="0" />
                    </div>
                </div>
                <div class = "dp_info ">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip">
                            {l s='First name * :' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4" style="width: 75%;">                    
                        <input type="text" class="form-control" id="input_first_name" name="first_name" style="width: 100%;" value="" required="">
                    </span>
                </div>
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip">
                            {l s='Last name * :' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4" style="width: 75%;">                    
                        <input type="text" class="form-control" id="input_last_name" name="last_name" style="width: 100%;" value="" required="">
                    </span>
                </div>
                {if $op_company_name == 1}
				<div class = "dp_info">
					<label class="control-label col-lg-3">
						<span class="label-tooltip" style="font-size: 12px;">
							{l s='Company name :' mod='askforaquotemodul'}
						</span>
					</label>
					<span class="col-lg-4 " style="width: 75%;">                    
						<input type="text" class="form-control" id="input_company" name="company_name" style="width: 100%;" value="" />
					</span>
				</div>
				<div class="dp_info">
					<label class="control-label col-lg-3">
						<span class="label-tooltip" style="font-size: 12px;">
							{l s='Company address :' mod='askforaquotemodul'}
						</span>
					</label>
					<span class="col-lg-4 " style="width: 75%;">                    
						<input type="text" class="form-control" id="input_company_address" name="company_address" style="width: 100%;" value="" />
					</span>
				</div>
                {/if}
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip txtPhone">
                            {l s='Phone :' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4 " style="width: 75%;">                    
                        <input type="text" class="form-control" id="input_phone" name="phone" style="width: 100%;" value="" >
                    </span>
                </div>
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip txtEmail">
                            {l s='Email * :' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4 " style="width: 75%;">                    
                        <input type="text" class="form-control" id="input_email" name="email" id="checkemail" style="width: 100%;" value="" required="">
                    </span>
                </div>
                <div class = "dp_info">
                    <label class="control-label col-lg-3">
                        <span class="label-tooltip txtEmail">
                            {l s='Subject :' mod='askforaquotemodul'}
                        </span>
                    </label>
                    <span class="col-lg-4 " style="width: 75%;">                    
                        <input type="text" class="form-control" name="quote_name" style="width: 100%;" value="">
                    </span>
                </div>
            </div>
        </div>
        <div class="td_order_note" method="POST" action="">
            <div class = "panel panel_Message_dbboo" style="padding-bottom:65px;">
                <div class = "panel-heading col-lg-12">
                    <i></i> <label>{l s='Order Notes' mod='askforaquotemodul'}</label>
                </div>
                <div class = "header_messages"  >
                    <span>{l s='Messages' mod='askforaquotemodul'}</span><i class = "icon-envelope" style = "margin-left:10px;"></i>
                </div>
                <div class = "text_message_adm">
                    <textarea name="message_dbboo" value="" class = "content_mess_dbboo" rows="4" cols="5"></textarea>
                </div>
            </div>
        </div>
    </div>
    
        <div class = "panel">
            <div class = "panel-heading">
                <i class = "icon-user"></i> <label>{l s='Products' mod='askforaquotemodul'}</label>
                <span class="panel-heading-action">
                    <span  class="list-toolbar-btn td_new_quote" href="#">
                        <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Add new" data-html="true" data-placement="top">
                                <i class="process-icon-new" style="text-align: center;font-size: 18px;line-height: 30px;"></i>
                        </span>
                    </span>
                    
                </span>
            </div>
            <div id="td_add_new">
            <div class="td_searchhhhh">
                <label class="control-label col-lg-3">
                    <span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="Search for an existing product by typing the first letters of its name.">
                        {l s='Search for a product' mod='askforaquotemodul'}
                    </span>
                </label>
                <div class="col-lg-6">
                        <div class="input-group" style="float: left;width: 100%;">
                            <input type="text" id="customer" class= "td_search_product" value="" />
                            <span class="input-group-addon" onClick="searchproduct()">
								<span class="loadicon"><i class="icon-refresh icon-spin"></i></span>
                                <i class="icon-search"></i>
                            </span>
                        </div>
                </div>
            </div>
                            
                <div id="products_found" style="display:none;">
                    <div class="abc">
                        <div id="td_product_list" class="form-group">
                            <label class="control-label col-lg-3">{l s='Product' mod='askforaquotemodul'}</label>
                            <div id="img_loading_gif"><img class = "img_loading" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
                        
                            <div id="td_list_product"></div>
                        </div>
                        </br>
                        <div class="td_show_attr_price">
                            <label class="control-label combiornot col-lg-3">{l s='Combination' mod='askforaquotemodul'}</label>
                            <div id="img_loading_gif_attr" style="margin-left: 265px;"><img class = "img_loading2" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif"/></div>
                            <div id="td_attributes_list" class="form-group" >
                                <div class="col-lg-6">
                                    <select class="id_product_attribute" id="combi_product" style="">
                                        <option value="">{l s='Select Combination' mod='askforaquotemodul'}</option>
                                        
                                    </select>
                                </div>
                            </div>
                            </br>
                            <div class="td_quanity_max">
                                
                            </div>
                                <div class="form-group">
                                    <div class="col-lg-9 col-lg-offset-3">
                                        <a class="btn btn-default td_add_new_product" id="td_add_new_pro_newquote">
                                            <i class="icon-ok text-success"></i>
                                            {l s='Add New Product' mod='askforaquotemodul'}
                                        </a>
										<span class="loadicon_addp" style="display: none;"><i class="icon-refresh icon-spin"></i></span>
                                    </div>
                                </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="products_err" style="display:none;" class="alert alert-danger"><span>Product not found</div>
            <div id="quote_err" style="display:none;" class="alert alert-danger"><span>Please add new product</div>
            <div class = "list_product table-responsive">
                <table class="table" id="orderProducts">
                    <thead>
                        <tr>
                            <th><span class="title_box ">{l s='Position' mod='askforaquotemodul'}</span></th>
							<th>#</th>
                            <th><span class="title_box ">{l s='Product' mod='askforaquotemodul'}</span></th>
                            <th>
                                <span class="title_box ">{l s='SKU' mod='askforaquotemodul'}</span>
                            </th>
                            <th>
                                <span class="title_box ">{l s='Unit Price' mod='askforaquotemodul'}</span>
                            </th>
                            <th><span class="title_box ">{l s='Qty' mod='askforaquotemodul'}</span></th>                        
                            <th>
                                <span class="title_box ">{l s='Total' mod='askforaquotemodul'}</span>
                            </th>
                            <th colspan="2"></th>
                            <th></th>
                        </tr>
                    </thead>                   
					<tbody class="product_table_newquote">
					</tbody> 
                    <input type = "hidden" value="" data-sign-dbboo="" class = "qty_product_dbboo"></input>
                </table>
            </div>
            
            <div class="td_shipping_popup col-sm-4">
            <div class="block_content">
                <div style="background-color: #fff;border: solid 1px #d3d8db;border-radius: 5px;float: left;width: 100%;">
                    <h3 class="page-subheading" style="margin-top: 10px;margin-bottom: -8px;margin-left:15px;margin-right: 35px;">{l s='Choose a shipping option' mod='askforaquotemodul'}</h3>
                    
                        <div class="ba_newsletter_mail_list checkbox" style="line-height:13px;float:left;width: 100%;">
                            <ul style="float:left">
                                {foreach from=$delay key="key" item=nameshipping}
                                {assign var="count" value=$key+1}
                                    <div class="td_checkbox">
                                            <span style="float:left;"><input type="radio" name="radio_shipping" class="td_checkbox_shippingcost" value="{$nameshipping.id_carrier|escape:'htmlall':'UTF-8'}"></span>
                                            <span class="td_name_delay">
											{if $nameshipping.name != '0'}
												{$nameshipping.name|escape:'htmlall':'UTF-8'}
											{else}
												{$PS_SHOP_NAME|escape:'htmlall':'UTF-8'}
											{/if}
											</span>
                                    </div>
                                {/foreach}
                                
                            </ul>
                        </div>
                </div>   
                        <div class="button_choose" style="padding-left: 12.5%;padding-top: 12px;" align="center">
							<img class="img_loading2 td_choose_shipping_loading" style="display:none;margin:10px 0 0 7px;float:right;" width="15px;" src="../modules/askforaquotemodul/views/img/ajax_loadding.gif" />
                            <button type="button" id="    " style="" class="td_choose_shipping setup-customer btn btn-default pull-right">
                                <i class="icon-arrow-right"></i> {l s='Choose' mod='askforaquotemodul'}
							</button>
                        </div> 
            </div>
            <span class="close_popup_td_shipping"><a title="Close" class="fancybox-close exit_popup" href="javascript:;"></a></span>
        </div>     
            <div class="panel total_price" style="width: 33%;margin-left: 67%;margin-top:30px;padding-top: 180px;position: relative;">
                <div class="table_total_pri" style="position:absolute;top:10px;width: 94%;border:none;">
                    <div class="row">
                        <div class="col-sm-4" style="float:left;display:block;padding-top:8px;width: 33.3333%;text-align: right;">{l s='Shipping cost:' mod='askforaquotemodul'}</div>
                        <div class="col-sm-8">
						<span class="td_shippingtax" style="float:left;width: 72%;">
							<input name="infor_quote[shipping_cost]" onkeyup="baquote_EditShippingCost(this)" onkeypress="return baquote_keyPressPrice(this, event);" type="text" class="td_shipping_price form-control" id="change1" style="width:100%;"  value="0.00">
							<input name="shipping_cost_tax_plain" type="hidden" class="shipping_cost_tax_plain form-control" data-tax-rate="0.00" value="0.00" />
						</span>
                        <span class="estimate-block" style="float:left;padding: 7px 5px 0px 3px;cursor:pointer;">
                            <a id="td_auto_shipping" name="td_auto_shipping" style="color: #0077a4;text-decoration: none;font-size:11px;cursor:pointer;">{l s='Calc' mod='askforaquotemodul'}
                            </a>
                        </span>
                        <div class="infor_shipping" style="float:left;height: 34px;clear:both;"><p class="help-block">{l s='Estimate Shipping Cost.' mod='askforaquotemodul'}</p></div>
						</div>
                    </div>
                </div>
                <div class="table_total_pri" style="position:absolute;top:70px;width: 94%;">
                    <div style="row">
						<div class="col-sm-4" style="float:left;display:block;padding-top:8px; width: 33.3333%;text-align: right;">{l s='Tax cost:' mod='askforaquotemodul'}</div>
                        <div class="col-sm-8">
						<span class="td_autotax" style="float:left;width: 72%;"><input name="infor_quote[tax_cost]" onkeyup="baquote_EditTaxCost(this)" onkeypress="return baquote_keyPressPrice(this, event);" type="text" class="td_tax_price form-control" id="change2"  style="width:100%;" value="0.00"></span>
                        <span class="estimate-block" style="float:left;padding: 7px 5px 0px 3px;cursor:pointer;">
                            <a id="td_auto_tax" name="td_auto_tax" style="color: #0077a4;text-decoration: none;font-size:11px;cursor:pointer;">{l s='Calc' mod='askforaquotemodul'}
                            </a>
							<span class="loadicon_tax" style="display: none;"><i class="icon-refresh icon-spin"></i></span>
                        </span>
                        <div class="infor_tax" style="float: left;height: 34px;"><p class="help-block">{l s='Estimate Tax Cost.' mod='askforaquotemodul'}</p></div>
						</div>
					</div>
                </div>
                <div class="table_total_pri" style="position:absolute;top:148px;width: 94%;">
                   <div class="col-sm-4" style="font-weight: bold;text-align:right;">
                        <span class="estimate-block" style="display:block;padding-top:8px;border:none;">{l s='Total:' mod='askforaquotemodul'}</span>
                    </div>
					<div class="col-sm-8" >
						<div class="total_price_quote_dbboo" style="height: 40px;display: block;padding-top: 10px;">
							<input name="infor_quote[total_price_all]" type = "hidden" value="0.00" id="td_totalprice_newquote" class="total_price_quote_dbboo td_total_pri_newquote">
							<span>{l s='$0.00' mod='askforaquotemodul'}</span>
							<input type = "hidden" value="0.00" class="td_fixed_total_price">
							<input type = "hidden" value="0" id="td_pri_pro_havetax_max_fixed" class="td_pri_pro_havetax_max_fixed">
							<input type = "hidden" value="0" id="td_pri_pro_havetax_min_fixed" class="td_pri_pro_havetax_min_fixed">
							<input type = "hidden" value="0" id="td_price_have_shippingcost" class="td_price_have_shippingcost">
							<input type = "hidden" value="0" id="td_price_have_tax" class="td_price_have_tax">
						</div>
					</div>
                </div>
            </div>
        </div>  
        
        <div class="panel-footer">
            <a href="{$bamodul|escape:'htmlall':'UTF-8'}&token={$token_adm|escape:'htmlall':'UTF-8'}&configure=askforaquotemodul&tab_module=shipping_logistics&module_name=askforaquotemodul" class="btn btn-default"><i class="process-icon-cancel"></i> {l s='Cancel' mod='askforaquotemodul'}</a>
            <button type="submit" id="td_save_new_quote" name="save_new_quote" class="btn btn-default pull-right"><i class="process-icon-save"></i> {l s='Save' mod='askforaquotemodul'}</button>
            
        </div>
        
    </form>
</div>    
