Commit ed9e5be5 authored by Mario's avatar Mario

warn about unsaved changes in checkout form

parent dfbe8eaf
......@@ -6,6 +6,8 @@
<h3>{{if $title}}{{$title}}{{else}}Order{{/if}}</h3>
<div class="section-content-wrapper">
<form id="cart_form" method="post">
<input type="hidden" name="cart_posthook" value="update_item">
<table class="w-100">
<th width=10%>Qty</th>
......@@ -13,8 +15,6 @@
<th width=20% style="text-align:right;">Price each {{if $currencysymbol}}({{$currencysymbol}}){{/if}}</th>
<th width=20% style="text-align:right;">Extended</th>
<form method="post">
<input type="hidden" name="cart_posthook" value="update_item">
{{foreach $items as $item}}
......@@ -32,11 +32,11 @@
<td colspan=4>
{{if !$order_checkedout}}
<button class="btn btn-outline-success btn-sm" type="submit" name="Submit" title="Update Cart">Update</button>
<button id="cart_update" class="btn btn-success btn-sm invisible" type="submit" name="Submit" title="Update Cart"><i class="fa fa-check"></i> Save Changes</button>
<th style="text-align:right;">Subtotal</th>
......@@ -60,5 +60,12 @@
$('#cart_form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] });
$('#cart_form').on('dirty.areYouSure', function() {
<!-- basic_checkout_*.tpl -->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment