<?php

	/**
	 * Integriert die Abo-Einstellungen in das Produkt
	 */
	
?>
<script type="text/javascript">/* <![CDATA[ */

	jQuery(document).ready(function() {

		jQuery('#wpsg_mod_abo_activ').bind('change', function() {

			if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_abo_layer').show();
			else jQuery('#wpsg_mod_abo_layer').hide();
			
		} ).change();

		jQuery('#wpsg_mod_abo_resell').bind('change', function() {

			if (jQuery(this).attr('checked')) jQuery('#wpsg_mod_abo_resell_layer').show();
			else jQuery('#wpsg_mod_abo_resell_layer').hide();
			
		} ).change();
		
	} );

/* ]]> */</script>

<div class="postbox" id="wpsg_abo">		
	<h3 class="wpsg_handlediv">
		<span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
		<span><?php echo __('Abo Produkt', 'wpsg'); ?></span>
	</h3>	
	<div class="inside">
	
		<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_activ', __('Abo Produkt', 'wpsg'), $this->view['product']['wpsg_mod_abo_activ']); ?>
		
		<div id="wpsg_mod_abo_layer">
			
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_abo_resell', __('Anzahl beschränken', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell']); ?>
			
			<div id="wpsg_mod_abo_resell_layer">
				
				<?php echo wpsg_drawForm_Input('wpsg_mod_abo_resell_count', __('Anzahl', 'wpsg'), $this->view['product']['wpsg_mod_abo_resell_count']); ?>
				
			</div>
			
			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_price', wpsg_translate(__('Abo Preis (#1#)', 'wpsg'), (($this->get_option('wpsg_preisangaben') == WPSG_NETTO)?__('Netto', 'wpsg'):__('Brutto', 'wpsg'))), wpsg_ff($this->view['product']['wpsg_mod_abo_price']), array('unit' => $this->get_option('wpsg_currency'))); ?>		
			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_durration', __('Abo Dauer (Tage)', 'wpsg'), $this->view['product']['wpsg_mod_abo_durration']); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_abo_url', __('URL Benachrichtigung', 'wpsg'), $this->view['product']['wpsg_mod_abo_url'], array('hint' => wpsg_translate(__('nohspc_Wird hier nichts angegeben, so wird die URL aus der <a href="#1#">Modulkonfiguration</a> bei Ablauf/Verlängerung benachrichtigt.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo'))); ?>			 
			
			<div class="wpsg_clear"></div>
			
		</div>
		
	</div>
</div>