Subversion Repositories wpShopGermany4

Rev

Rev 4943 | Rev 5439 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1429 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Liste der Bestellbedingungen im Backend
5
	 */
6
 
7
?>
1435 daniel 8
<script type="text/javascript">/* <![CDATA[ */
9
 
10
	jQuery(document).ready(function() {
11
 
12
		jQuery('.wpsg_mod_ordercondition_edit_name').each(function() {
13
 
14
			var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_name_/, '');
15
 
16
			jQuery(this).editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1', {
17
				submitdata: {
18
		    		field: 'name',
19
		    		oc_id: oc_id
20
				},
21
				submit: '<?php echo __('Speichern', 'wpsg'); ?>',
22
				placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
23
				indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
24
		    	tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
25
			} );
26
 
27
		} );
28
 
29
		jQuery('.wpsg_mod_ordercondition_edit_typ').bind('change', function() {
30
 
31
			var oc_id = jQuery(this).attr("id").replace(/wpsg_mod_ordercondition_typ_/, '');
32
			var value = jQuery(this).val();
33
 
34
			jQuery.ajax( {
35
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=inlinedit&noheader=1',
36
				data: {
37
					field: 'typ',
38
					value: value,
39
					oc_id: oc_id
40
				}
41
			} );
42
 
43
		} );
44
 
45
		jQuery('#wpsg_oc_list .wpsg_icon_remove').bind('click', function() {
46
 
47
			if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Bestellbedingung entfernen möchten?', 'wpsg'); ?>')) return false;
48
 
49
			jQuery('#wpsg_oc_list').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
50
 
51
			jQuery.ajax( {
52
				url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordercondition&do=remove&noheader=1',
53
				data: {
54
					oc_id: jQuery(this).parent().attr("id")
55
				},
56
				success: function(data)
57
				{
58
 
59
					jQuery('#wpsg_oc_list').html(data);
60
 
61
				}
62
			} );
63
 
64
		} );
65
 
66
	} );
67
 
68
/* ]]> */</script>
1429 daniel 69
<?php if (!is_array($this->view['wpsg_mod_ordercondition']['data']) || sizeof($this->view['wpsg_mod_ordercondition']['data']) <= 0) { ?>
70
<?php echo __('Bisher keine Bestellbedingungen angelegt.', 'wpsg'); ?>
71
<?php } else { ?>
72
<?php $i = 0; foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { $i ++; ?>
73
 
1435 daniel 74
	<div id="wpsg_mod_ordercondition_row_<?php echo $oc['id']; ?>">
1429 daniel 75
 
1435 daniel 76
		<?php echo wpsg_drawForm_Input($oc['id'], __('ID', 'wpsg'), $oc['id'], array('text' => true, 'remove' => '1')); ?>
77
		<?php echo wpsg_drawForm_Input('wpsg_mod_ordercondition_name_'.$oc['id'], __('Bezeichnung', 'wpsg'), $oc['name'], array('text' => true, 'class_text' => 'wpsg_mod_ordercondition_edit_name wpsg_editable')); ?>
78
		<?php echo wpsg_drawForm_Select('wpsg_mod_ordercondition_typ_'.$oc['id'], __('Wirkungsbereich', 'wpsg'), array('0' => __('Inaktiv', 'wpsg'), '1' => __('Jede Bestellung', 'wpsg'), '2' => __('Bestimmte Produkte', 'wpsg')), $oc['typ'], array('class_select' => 'wpsg_editable wpsg_mod_ordercondition_edit_typ')); ?>
79
 
80
		<div class="wpsg_form_field">
81
			<div class="wpsg_form_left">
82
				<label for="wpsg_mod_ordercondition_text_<?php echo $oc['id']; ?>"><?php echo __('Bedingungstext', 'wpsg'); ?>:</label>
83
			</div>
84
			<div class="wpsg_form_right">
85
				<p>
86
					<a href="#" onclick="return wpsg_showOCText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
87
				</p>
88
			</div>
1429 daniel 89
		</div>
1435 daniel 90
		<div class="wpsg_clear"></div>
3661 daniel 91
 
92
		<div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
3652 daniel 93
			<textarea class="wpsg_mod_ordercondition_text" id="oc_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['text']); ?></textarea>
1435 daniel 94
			<div class="wpsg_clear"></div><br />
3675 daniel 95
			<input class="button" type="button" onclick="wpsg_saveOCText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br /><br />
1429 daniel 96
		</div>
1435 daniel 97
 
3661 daniel 98
		<div class="wpsg_form_field">
99
			<div class="wpsg_form_left">
100
				<label for="wpsg_mod_ordercondition_errortext_<?php echo $oc['id']; ?>"><?php echo __('Fehlertext', 'wpsg'); ?>:</label>
101
			</div>
102
			<div class="wpsg_form_right">
103
				<p>
104
					<a href="#" onclick="return wpsg_showOCErrorText(<?php echo $oc['id']; ?>);"><?php echo __('Editor anzeigen/verbergen', 'wpsg'); ?></a>
105
				</p>
106
			</div>
107
		</div>
108
		<div class="wpsg_clear"></div>
109
 
110
		<div class="wpsg_form_field wpsg_mod_ordercondition_editor wpsg_mod_ordercondition_editor_errortext_<?php echo $oc['id']; ?>" style="display:none; width:745px; min-height:225px;">
111
			<textarea class="wpsg_mod_ordercondition_text" id="oc_errortext_<?php echo $oc['id']; ?>" name="oc[<?php echo $oc['id']; ?>]"><?php echo wpsg_hspc($oc['errortext']); ?></textarea>
112
			<div class="wpsg_clear"></div><br />
3675 daniel 113
			<input class="button" type="button" onclick="wpsg_saveOCErrorText(<?php echo $oc['id']; ?>);" value="<?php echo __('Text speichern', 'wpsg'); ?>" /><br />
3661 daniel 114
		</div>
115
 
3652 daniel 116
		<?php if ($i < sizeof($this->view['wpsg_mod_ordercondition']['data'])) { ?><br /><hr /><?php } ?>
1435 daniel 117
 
1429 daniel 118
	</div>
119
 
120
<?php } ?>
121
<?php } ?>