5439 |
daniel |
1 |
<div class="form-group form-group-sm form-select <?php echo ((wpsg_isSizedString($this->view['field_config']['help']))?'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 |
|
|
|
9 |
<select id="<?php echo $this->view['field_id']; ?>" name="<?php echo $this->view['field_name']; ?>" class="form-control input-sm" <?php echo $this->view['atts_select']; ?>>
|
5450 |
daniel |
10 |
|
|
|
11 |
<?php
|
|
|
12 |
|
|
|
13 |
if (wpsg_isTrue($this->view['field_config']['optgroup']))
|
|
|
14 |
{
|
|
|
15 |
|
|
|
16 |
$arGroup = array();
|
|
|
17 |
|
|
|
18 |
foreach ($this->view['field_values'] as $k_group => $v_group)
|
|
|
19 |
{
|
|
|
20 |
|
|
|
21 |
$arGroup[$k_group] = $v_group[0];
|
|
|
22 |
$arValues[$k_group] = $v_group[1];
|
|
|
23 |
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
}
|
|
|
27 |
else
|
|
|
28 |
{
|
|
|
29 |
|
|
|
30 |
$arValues = array($this->view['field_values']);
|
|
|
31 |
$arGroup = null;
|
|
|
32 |
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
?>
|
|
|
36 |
|
|
|
37 |
<?php foreach ($arValues as $k_group => $v_group) { ?>
|
|
|
38 |
|
|
|
39 |
<?php if (!is_null($arGroup)) { ?><optgroup label="<?php echo $arGroup[$k_group]; ?>"><?php } ?>
|
|
|
40 |
|
|
|
41 |
<?php foreach ($v_group as $k => $v) { ?>
|
|
|
42 |
<option <?php
|
|
|
43 |
|
|
|
44 |
if (wpsg_isTrue($this->view['field_config']['noKeys']) && wpsg_isSizedString($v, $this->view['field_value'])) echo ' selected="selected" ';
|
|
|
45 |
else echo (($k == $this->view['field_value'])?'selected="selected"':'');
|
|
|
46 |
|
|
|
47 |
?> value="<?php
|
|
|
48 |
|
|
|
49 |
if (wpsg_isTrue($this->view['field_config']['noKeys'])) echo wpsg_hspc($v);
|
|
|
50 |
else echo wpsg_hspc($k);
|
|
|
51 |
|
|
|
52 |
?>"><?php echo wpsg_hspc($v); ?></option>
|
|
|
53 |
<?php } ?>
|
|
|
54 |
|
|
|
55 |
<?php if (!is_null($arGroup)) { ?></optgroup><?php } ?>
|
|
|
56 |
|
5439 |
daniel |
57 |
<?php } ?>
|
5450 |
daniel |
58 |
|
5439 |
daniel |
59 |
</select>
|
|
|
60 |
|
|
|
61 |
<?php if (wpsg_isSizedString($this->view['field_config']['help'])) { ?>
|
|
|
62 |
<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 |
63 |
<?php } ?>
|
5439 |
daniel |
64 |
|
|
|
65 |
</div>
|
5266 |
daniel |
66 |
|
|
|
67 |
</div>
|
|
|
68 |
|
5391 |
daniel |
69 |
<div class="clearfix wpsg_clear"></div>
|
|
|
70 |
|
5266 |
daniel |
71 |
</div>
|