/
navigator.php
37 lines (31 loc) · 1.43 KB
/
navigator.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<div class="form-group form-inline pull-left" style="margin-left: 150px;">
<label for='questionNav'><?php eT("Move to question:");?></label>
<select id='questionNav' class="form-control" >
<optgroup class='activesurveyselect' label='<?php eT("Before"); ?>' >
<?php foreach ($theserows as $row): ?>
<option value='<?php echo $row['value']; ?>'>
<?php echo $row['text']; ?>
</option>
<?php endforeach; ?>
</optgroup>
<optgroup class='activesurveyselect' label='<?php eT("Current"); ?>' >
<option value='<?php echo $currentValue; ?>' selected='selected'>
<?php echo $currentText; ?>
</option>
</optgroup>
<optgroup class='activesurveyselect' label='<?php eT("After"); ?>' >
<?php foreach ($postrows as $row): ?>
<option value='<?php echo $row['value']; ?>'>
<?php echo $row['text']; ?>
</option>
<?php endforeach; ?>
</optgroup>
</select>
<a href="#" id="selector__hiddenNavigation" class="hidden pjax">hidden</a>
</div>
<?php
App()->getClientScript()->registerScript('conditionmovetoquestion',
"$('#questionNav').off('.conditionmovetoquestion').on('change.conditionmovetoquestion', function(e){
$(document).trigger('pjax:load', {url : $(this).val()});
});", LSYii_ClientScript::POS_POSTSCRIPT);
?>