valid customer removal

This commit is contained in:
Manuel Raynaud
2013-09-12 12:40:14 +02:00
parent 5d87e48ba0
commit 9856528a94
8 changed files with 115 additions and 16 deletions

View File

@@ -260,7 +260,8 @@
{* Delete confirmation dialog *}
{capture "delete_customer_dialog"}
<input type="hidden" name="customer_id" id="customer_delete_id" value="" />
<input type="hidden" name="customer_page" value="{$customer_page}">
<input type="hidden" name="customer_id" id="delete_customer_id">
{/capture}
{include
@@ -271,7 +272,18 @@
dialog_message = {intl l="Do you really want to delete this customer ?"}
form_action = {url path='/admin/customer/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
form_content = {$smarty.capture.delete_customer_dialog nofilter}
form_id = "form_delete_customer"
}
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
$(".customer-delete").click(function(){
$("#delete_customer_id").val($(this).attr("data-id"));
});
</script>
{/block}

View File

@@ -14,6 +14,7 @@ Parameters:
form_action = the form action URL, subtitted by a click on OK button
form_method = the form method, default "POST"
form_content = the form content
form_id = the form id
*}
<div class="modal fade" id="{$dialog_id}" tabindex="-1" role="dialog" aria-hidden="true">
@@ -28,7 +29,7 @@ Parameters:
{$dialog_message nofilter}
</div>
<form method="{$form_method|default:POST}" action="{$form_action}">
<form method="{$form_method|default:POST}" action="{$form_action}" id="{$form_id}">
{$form_content nofilter}