Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
7932 daniel 1
<div class="form-group form-group-sm form-select <?php echo ((wpsg_isSizedString($this->view['field_config']['help']) || wpsg_isSizedString($this->view['field_config']['icon']))?'has-feedback':''); ?>" <?php echo ((isset($this->view['field_config']['wrap_id']))?'id="'.$this->view['field_config']['wrap_id'].'" ':''); ?>>
5266 daniel 2
 
3
	<label class="col-sm-6 control-label" for="<?php echo $this->view['field_id']; ?>"><?php echo $this->view['field_label']; ?></label>
4
 
5
	<div class="col-sm-6">
6
 
5439 daniel 7
		<div class="wpsg_field_wrap">
8
 
5748 daniel 9
			<select
10
				id="<?php echo $this->view['field_id']; ?>"
11
				name="<?php echo $this->view['field_name']; ?>"
12
				tabindex="<?php
13
 
14
				if (!isset($GLOBALS['wpsg']['tabindex']))
15
				{
16
 
17
					$GLOBALS['wpsg']['tabindex'] = 10;
18
 
19
				}
20
				else
21
				{
22
 
23
					$GLOBALS['wpsg']['tabindex'] += 10;
24
 
25
				}
26
 
27
				echo $GLOBALS['wpsg']['tabindex'];
28
 
29
				?>"
5825 daniel 30
				class="form-control input-sm <?php echo wpsg_getStr($this->view['field_config']['field_class']); ?>" <?php echo $this->view['atts_select']; ?>>
5450 daniel 31
 
32
				<?php
33
 
34
					if (wpsg_isTrue($this->view['field_config']['optgroup']))
35
					{
36
 
37
						$arGroup = array();
38
 
39
						foreach ($this->view['field_values'] as $k_group => $v_group)
40
						{
41
 
42
							$arGroup[$k_group] = $v_group[0];
43
							$arValues[$k_group] = $v_group[1];
44
 
45
						}
46
 
47
					}
48
					else
49
					{
50
 
51
						$arValues = array($this->view['field_values']);
52
						$arGroup = null;
53
 
54
					}
55
 
56
				?>
57
 
58
				<?php foreach ($arValues as $k_group => $v_group) { ?>
59
 
60
					<?php if (!is_null($arGroup)) { ?><optgroup label="<?php echo $arGroup[$k_group]; ?>"><?php } ?>
61
 
62
					<?php foreach ($v_group as $k => $v) { ?>
63
					<option <?php
64
 
6238 daniel 65
						if (wpsg_isSizedArray($this->view['field_value']))
66
						{
67
 
68
							echo ((in_array($k, $this->view['field_value']))?'selected="selected"':'');
69
 
70
						}
71
						else
72
						{
73
 
74
							if (wpsg_isTrue($this->view['field_config']['noKeys']) && wpsg_isSizedString($v, $this->view['field_value'])) echo ' selected="selected" ';
7816 daniel 75
							else echo ((strval($k) === strval($this->view['field_value']))?'selected="selected"':'');
6238 daniel 76
 
77
						}
5450 daniel 78
 
79
					?> value="<?php
80
 
81
						if (wpsg_isTrue($this->view['field_config']['noKeys'])) echo wpsg_hspc($v);
82
						else echo wpsg_hspc($k);
83
 
84
					?>"><?php echo wpsg_hspc($v); ?></option>
85
					<?php } ?>
86
 
87
					<?php if (!is_null($arGroup)) { ?></optgroup><?php } ?>
88
 
5439 daniel 89
				<?php } ?>
5450 daniel 90
 
5439 daniel 91
			</select>
92
 
93
			<?php if (wpsg_isSizedString($this->view['field_config']['help'])) { ?>
6005 hartmut 94
				<a href="#" data-wpsg-tip="<?php echo $this->view['field_config']['help']; ?>" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=<?php echo $this->view['field_config']['help']; ?>" class="glyphicon glyphicon glyphicon-question-sign form-control-feedback" aria-hidden="true"></a>
5266 daniel 95
			<?php } ?>
5439 daniel 96
 
5916 daniel 97
			<?php if (wpsg_isSizedString($this->view['field_config']['icon'])) { ?>
98
				<a href="#" class="<?php echo $this->view['field_config']['icon']; ?> form-control-feedback" aria-hidden="true"></a>
99
			<?php } ?>
100
 
5439 daniel 101
		</div>
7811 daniel 102
 
103
        <?php if (wpsg_isSizedString($this->view['field_config']['hint'])) { ?>
104
			<div class="hint info"><?php echo $this->view['field_config']['hint']; ?></div>
105
        <?php } ?>
106
 
5266 daniel 107
	</div>
108
 
5391 daniel 109
	<div class="clearfix wpsg_clear"></div>
110
 
5266 daniel 111
</div>