<?php

	/**
	 * Template für das Modul "Rechtstexte"
	 */

?>

<?php echo wpsg_drawForm_Select('wpsg_mod_legaltexts_provider', __('Anbieter', 'wpsg'), array(
	wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS => __('Protected Shops', 'wpsg'),
	wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND => __('Händlerbund', 'wpsg'),
	wpsg_mod_legaltexts::PROVIDER_ITRECHT => __('IT-Recht Kanzlei München', 'wpsg')
), $this->get_option('wpsg_mod_legaltexts_provider')); ?>

<br />

<div id="wpsg_provider_target"></div>

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

	jQuery(document).ready(function() {

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

			jQuery('#wpsg_provider_target').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-Admin&action=module&modul=wpsg_mod_legaltexts&noheader=1&do=add',
				data: {
					'provider': jQuery('#wpsg_mod_legaltexts_provider').val()
				},
				success: function(data) {

					jQuery('#wpsg_provider_target').html(data);
					
				}
			} );
			
		} ).change();
		
	} );

/* ]]> */</script>