<?php

	/**
	 * Template für die Integration der Zahlungsart Click&Buy in die Bestellverwaltung
	 */

?>
<script type="text/javascript">/* <![CDATA[ */

	function wpsg_mod_cab_reload()
	{

		jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
		
		jQuery.ajax( {
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=refresh&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
			data: {
			},
			success: function(data) {
				
				jQuery('#wpsg_mod_cab_inner').html(data);
				
			}
		} );

		return false;
		
	} // function wpsg_mod_cab_reload()

	function wpsg_mod_cab_rebuild()
	{

		jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
		
		jQuery.ajax( {
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=rebuild&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
			data: {
			},
			success: function(data) {
				
				jQuery('#wpsg_mod_cab_inner').html(data);
				
			}
		} );
		 
		return false;
		
	} // function wpsg_mod_cab_rebuild()

	function wpsg_mod_cab_repay()
	{

		jQuery('#wpsg_mod_cab_inner').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
		
		jQuery.ajax( {
			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_cab&cmd=repay&noheader=1&edit_id=<?php echo $this->view['wpsg_mod_cab']['order']['id']; ?>',
			data: {
				value: jQuery('#wpsg_cab_repayvalue').val()				
			},
			success: function(data) {
				
				jQuery('#wpsg_mod_cab_inner').html(data);
				
			}
		} );
		 
		return false;
		
	} // function wpsg_mod_cab_repay()
	
/* ]]> */</script> 
		
<div id="wpsg_cab" class="postbox">
	<h3 class="wpsg_handlediv">
		<span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
		<span><?php echo __('Click & Buy', 'wpsg'); ?></span>
	</h3>
	<div class="inside" id="wpsg_mod_cab_inner">

		<?php echo $this->view['wpsg_mod_cab']['content']; ?>
 		
	</div>
</div>