earlier this week i screwed myself over by accidentally clicking the "delete" button beside the "paypal" pament type. i meant to click the configuration button, but i deleted paypal instead!

a confirmation would have saved me



Code: Select all
<script type="text/javascript">
function confirmDelete(href){
if (confirm("Are you sure you would like to delete this item?")) {
window.location.href = href;
}
}
</script>
Code: Select all
<a href="<?php echo $action['href']; ?>">
Code: Select all
<a <?php if(strpos(strtolower($action['icon']),'elete') > 0) { echo "onclick=\"confirmDelete('".$action['href']."')\" "; } else { echo "href=\"" . $action['href'] . "\""; } ?>>
Code: Select all
$action[] = array(
'icon' => 'delete.png',
'text' => $language->get('button_delete'),
'href' => $url->ssl('product', 'delete', array('product_id' => $result['product_id']))
);
Code: Select all
<div class="enabled" onmouseover="className='hover'" onmouseout="className='enabled'" onclick="location='<?php echo $delete; ?>';"><img src="template/default/image/delete_enabled.png" alt="<?php echo $button_delete; ?>" class="png" /><?php echo $button_delete; ?></div>
Code: Select all
<div class="enabled" onmouseover="className='hover'" onmouseout="className='enabled'" onclick="if(confirm('Do you really want to DELETE this order?')) location='<?php echo $delete; ?>'; else return false;"><img src="template/default/image/delete_enabled.png" alt="<?php echo $button_delete; ?>" class="png" /><?php echo $button_delete; ?></div>
Users browsing this forum: No registered users and 4 guests