-
Notifications
You must be signed in to change notification settings - Fork 988
/
_publication_panel.php
executable file
·155 lines (150 loc) · 7.7 KB
/
_publication_panel.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
/**
* Publication Panel
*/
?>
<script type="text/javascript">
var jsonUrl = '';
var sAction = '';
var sParameter = '';
var sTargetQuestion = '';
var sNoParametersDefined = '';
var sAdminEmailAddressNeeded = '<?php eT("If you are using token functions or notifications emails you need to set an administrator email address.",'js'); ?>'
var sURLParameters = '';
var sAddParam = '';
</script>
<!-- Publication panel -->
<div id='publication' class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-6">
<!-- Start date/time -->
<div class="form-group">
<label class="col-sm-6 control-label" for='startdate'><?php eT("Start date/time:"); ?></label>
<div class="col-sm-6 has-feedback">
<?php Yii::app()->getController()->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => "startdate",
'id' => 'startdate',
'value' => $startdate,
'pluginOptions' => array(
'format' => $dateformatdetails['jsdate'] . " HH:mm",
'allowInputToggle' =>true,
'showClear' => true,
'tooltips' => array(
'clear'=> gT('Clear selection'),
'prevMonth'=> gT('Previous month'),
'nextMonth'=> gT('Next month'),
'selectYear'=> gT('Select year'),
'prevYear'=> gT('Previous year'),
'nextYear'=> gT('Next year'),
'selectDecade'=> gT('Select decade'),
'prevDecade'=> gT('Previous decade'),
'nextDecade'=> gT('Next decade'),
'prevCentury'=> gT('Previous century'),
'nextCentury'=> gT('Next century'),
'selectTime'=> gT('Select time')
),
'locale' => convertLStoDateTimePickerLocale(Yii::app()->session['adminlang'])
)
));
?>
</div>
</div>
<!-- Expiry date/time -->
<div class="form-group">
<label class="col-sm-6 control-label" for='expires'><?php eT("Expiry date/time:"); ?></label>
<div class="col-sm-6 has-feedback">
<?php Yii::app()->getController()->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => "expires",
'id' => 'expires',
'value' => $expires,
'pluginOptions' => array(
'format' => $dateformatdetails['jsdate'] . " HH:mm",
'allowInputToggle' =>true,
'showClear' => true,
'tooltips' => array(
'clear'=> gT('Clear selection'),
'prevMonth'=> gT('Previous month'),
'nextMonth'=> gT('Next month'),
'selectYear'=> gT('Select year'),
'prevYear'=> gT('Previous year'),
'nextYear'=> gT('Next year'),
'selectDecade'=> gT('Select decade'),
'prevDecade'=> gT('Previous decade'),
'nextDecade'=> gT('Next decade'),
'prevCentury'=> gT('Previous century'),
'nextCentury'=> gT('Next century'),
'selectTime'=> gT('Select time')
),
'locale' => convertLStoDateTimePickerLocale(Yii::app()->session['adminlang'])
)
));
?>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<!-- List survey publicly -->
<div class="form-group">
<label class="col-sm-6 control-label" for='listpublic'><?php eT("List survey publicly:");?></label>
<div class="col-sm-6">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'listpublic',
'value'=> $esrow['listpublic'] == "Y",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- Set cookie to prevent repeated participation -->
<div class="form-group">
<label class="col-sm-6 control-label" for='usecookie'><?php eT("Set cookie to prevent repeated participation:"); ?></label>
<div class="col-sm-6">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'usecookie',
'value'=> $esrow['usecookie'] == "Y",
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')
));
?>
</div>
</div>
<!-- Use CAPTCHA for survey access -->
<?php $usecap = $esrow['usecaptcha']; // Just a short-hand ?>
<div class="form-group">
<label class="col-sm-6 control-label" for='usecaptcha_surveyaccess'><?php eT("Use CAPTCHA for survey access:"); ?></label>
<div class="col-sm-6">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'usecaptcha_surveyaccess',
'value'=> $usecap === 'A' || $usecap === 'B' || $usecap === 'C' || $usecap === 'X',
'onLabel'=>gT('On'),'offLabel'=>gT('Off')));
?>
</div>
</div>
<!-- Use CAPTCHA for registration -->
<div class="form-group">
<label class="col-sm-6 control-label" for='usecaptcha_registration'><?php eT("Use CAPTCHA for registration:"); ?></label>
<div class="col-sm-6">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'usecaptcha_registration',
'value'=> $usecap === 'A' || $usecap === 'B' || $usecap === 'D' || $usecap === 'R',
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')));
?>
</div>
</div>
<!-- Use CAPTCHA for save and load -->
<div class="form-group">
<label class="col-sm-6 control-label" for='usecaptcha_saveandload'><?php eT("Use CAPTCHA for save and load:"); ?></label>
<div class="col-sm-6">
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
'name' => 'usecaptcha_saveandload',
'value'=> $usecap === 'A' || $usecap === 'C' || $usecap === 'D' || $usecap === 'S',
'onLabel'=>gT('On'),
'offLabel'=>gT('Off')));
?>
</div>
</div>
</div>
</div>
</div>