5916 |
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':''); ?>">
|
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 |
|
|
|
65 |
if (wpsg_isTrue($this->view['field_config']['noKeys']) && wpsg_isSizedString($v, $this->view['field_value'])) echo ' selected="selected" ';
|
|
|
66 |
else echo (($k == $this->view['field_value'])?'selected="selected"':'');
|
|
|
67 |
|
|
|
68 |
?> value="<?php
|
|
|
69 |
|
|
|
70 |
if (wpsg_isTrue($this->view['field_config']['noKeys'])) echo wpsg_hspc($v);
|
|
|
71 |
else echo wpsg_hspc($k);
|
|
|
72 |
|
|
|
73 |
?>"><?php echo wpsg_hspc($v); ?></option>
|
|
|
74 |
<?php } ?>
|
|
|
75 |
|
|
|
76 |
<?php if (!is_null($arGroup)) { ?></optgroup><?php } ?>
|
|
|
77 |
|
5439 |
daniel |
78 |
<?php } ?>
|
5450 |
daniel |
79 |
|
5439 |
daniel |
80 |
</select>
|
|
|
81 |
|
|
|
82 |
<?php if (wpsg_isSizedString($this->view['field_config']['help'])) { ?>
|
|
|
83 |
<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-info-sign form-control-feedback" aria-hidden="true"></a>
|
5266 |
daniel |
84 |
<?php } ?>
|
5439 |
daniel |
85 |
|
5916 |
daniel |
86 |
<?php if (wpsg_isSizedString($this->view['field_config']['icon'])) { ?>
|
|
|
87 |
<a href="#" class="<?php echo $this->view['field_config']['icon']; ?> form-control-feedback" aria-hidden="true"></a>
|
|
|
88 |
<?php } ?>
|
|
|
89 |
|
5439 |
daniel |
90 |
</div>
|
5266 |
daniel |
91 |
|
|
|
92 |
</div>
|
|
|
93 |
|
5391 |
daniel |
94 |
<div class="clearfix wpsg_clear"></div>
|
|
|
95 |
|
5266 |
daniel |
96 |
</div>
|