Subversion Repositories wpShopGermany4

Rev

Rev 7286 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2843 daniel 1
<?php
2
 
3
	/**
4
	 * Template für das Modul "Rechtstexte"
5
	 */
7286 daniel 6
 
2843 daniel 7
?>
8
 
7286 daniel 9
<div class="wpsg_mod_legaltext_select">
10
 
11
	<label class="bg-info mark <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)?'open':''); ?>" title="<?php echo __('Premiumpartner', 'itrecht'); ?>">
12
 
13
		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_ITRECHT)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_ITRECHT; ?>" />
14
		<span class="name"><?php echo __('IT-Recht Kanzlei München') ?></span>
15
		<span class="grow"></span>
16
		<span class="text-info glyphicon glyphicon-star-empty" aria-hidden="true"></span>
17
 
18
	</label>
19
 
20
	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_ITRECHT; ?>"></div>
2843 daniel 21
 
7286 daniel 22
	<label class="<?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)?'open':''); ?>">
2843 daniel 23
 
7286 daniel 24
		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS; ?>" />
25
		<span class="name"><?php echo __('Protected Shops') ?></span>
2843 daniel 26
 
7286 daniel 27
	</label>
28
 
29
	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_PROTECTEDSHOPS; ?>"></div>
30
 
31
	<label class="<?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)?'open':''); ?>">
32
 
33
		<input type="radio" <?php echo (($this->view['wpsg_mod_legaltexts_provider'] == wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND)?'checked="checked"':''); ?> name="wpsg_mod_legaltexts_provider" class="wpsg_mod_legaltexts_provider" value="<?php echo wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND; ?>" />
34
		<span class="name"><?php echo __('Händlerbund') ?></span>
35
 
36
	</label>
37
 
38
	<div class="wpsg_provider_target wpsg_provider_target_<?php echo wpsg_mod_legaltexts::PROVIDER_HAENDLERBUND; ?>"></div>
39
 
40
</div>
41
 
7995 daniel 42
<script>
2843 daniel 43
 
44
	jQuery(document).ready(function() {
45
 
7286 daniel 46
		jQuery('.wpsg_mod_legaltexts_provider').bind('change', function() {
2843 daniel 47
 
7286 daniel 48
			if (parseInt(jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val()) > 0) {
2843 daniel 49
 
7286 daniel 50
				jQuery('.wpsg_mod_legaltext_select > label').removeClass('open');
51
				jQuery('.wpsg_provider_target').slideUp(125);
52
 
53
				var target = '.wpsg_provider_target_' + jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val();
54
 
55
				jQuery(target).html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
56
 
57
				jQuery.ajax( {
58
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_legaltexts&noheader=1&do=add',
59
					data: {
60
						'provider': jQuery('input[name=wpsg_mod_legaltexts_provider]:checked').val()
61
					},
62
					success: function(data) {
63
 
64
						jQuery(target).prev().addClass('open');
65
						jQuery(target).html(data);
66
						jQuery(target).slideDown(125);
67
 
68
					}
69
				} );
70
 
71
			}
2843 daniel 72
 
7995 daniel 73
		} );
2843 daniel 74
 
7995 daniel 75
		document.querySelector('.wpsg_mod_legaltexts_provider:checked').dispatchEvent(new Event('change'));
76
 
2843 daniel 77
	} );
78
 
7995 daniel 79
</script>