-
Notifications
You must be signed in to change notification settings - Fork 988
/
dummytokenform.php
133 lines (119 loc) · 6.8 KB
/
dummytokenform.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
<?php
/**
* Add dummy token
*/
?>
<div class="side-body">
<h3><?php eT("Create dummy tokens"); ?></h3>
<div class="row">
<div class="col-lg-12 content-right">
<?php echo CHtml::form(array("admin/tokens/sa/adddummies/surveyid/{$surveyid}/subaction/add"), 'post', array('id'=>'edittoken', 'name'=>'edittoken', 'class'=>'form30 form-horizontal')); ?>
<!-- ID -->
<div class="form-group">
<label class="col-sm-2 control-label">ID:</label>
<div class="col-sm-2">
<p class="form-control-static"><?php eT("Auto"); ?></p>
</div>
</div>
<!-- Number of tokens -->
<div class="form-group">
<label class="col-sm-2 control-label" for='amount'><?php eT("Number of tokens"); ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='text' size='20' id='amount' name='amount' value="100" />
</div>
</div>
<!-- Token length -->
<div class="form-group">
<label class="col-sm-2 control-label" for='tokenlen'><?php eT("Token length"); ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='text' size='20' id='tokenlen' name='tokenlen' value="<?php echo $tokenlength; ?>" />
</div>
</div>
<!-- First name -->
<div class="form-group">
<label class="col-sm-2 control-label" for='firstname'><?php eT("First name"); ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='text' size='30' id='firstname' name='firstname' value="" />
</div>
</div>
<!-- Last name -->
<div class="form-group">
<label class="col-sm-2 control-label" for='lastname'><?php eT("Last name"); ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='text' size='30' id='lastname' name='lastname' value="" />
</div>
</div>
<!-- Email -->
<div class="form-group">
<label class="col-sm-2 control-label" for='email'><?php eT("Email"); ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='email' maxlength='320' size='50' id='email' name='email' value="" />
</div>
</div>
<!-- Language -->
<div class="form-group">
<label class="col-sm-2 control-label" for='language'><?php eT("Language"); ?>:</label>
<div class="col-sm-2">
<?php echo languageDropdownClean($surveyid, Survey::model()->findByPk($surveyid)->language); ?>
</div>
</div>
<!-- Uses left -->
<div class="form-group">
<label class="col-sm-2 control-label" for='usesleft'><?php eT("Uses left:"); ?></label>
<div class="col-sm-2">
<input class='form-control' type='text' size='20' id='usesleft' name='usesleft' value="1" />
</div>
</div>
<!-- Validity -->
<div class="form-group">
<label class="col-sm-2 control-label" for='validfrom'><?php eT("Valid from"); ?>:</label>
<div class="col-sm-3 has-feedback">
<i class='fa fa-calendar form-control-feedback'></i>
<?php Yii::app()->getController()->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => "validfrom",
'value' => isset($validfrom) ? $validfrom : '',
'pluginOptions' => array(
'format' => $dateformatdetails['jsdate'] . " HH:mm",
'allowInputToggle' =>true,
'showClear' => true,
'locale' => convertLStoDateTimePickerLocale(Yii::app()->session['adminlang'])
)
));
?>
<span class="help-block"><?php printf(gT('Format: %s'), $dateformatdetails['jsdate'] . ' ' . gT('hh:mm')); ?></span>
</div>
<label class="col-sm-2 control-label" for='validuntil'><?php eT('Until:'); ?></label>
<div class="col-sm-3 has-feedback">
<i class='fa fa-calendar form-control-feedback'></i>
<?php Yii::app()->getController()->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => "validuntil",
'value' => isset($validuntil) ? $validuntil : '',
'pluginOptions' => array(
'format' => $dateformatdetails['jsdate'] . " HH:mm",
'allowInputToggle' =>true,
'showClear' => true,
'locale' => convertLStoDateTimePickerLocale(Yii::app()->session['adminlang'])
)
));
?>
<span class="help-block"><?php printf(gT('Format: %s'), $dateformatdetails['jsdate'] . ' ' . gT('hh:mm')); ?></span>
</div>
</div>
<!-- Attribute fields -->
<?php foreach ($aAttributeFields as $attr_name => $attr_description): ?>
<div class="form-group">
<label class="col-sm-2 control-label" for='<?php echo $attr_name; ?>'><?php echo $attr_description['description'] . ($attr_description['mandatory'] == 'Y' ? '*' : '') ?>:</label>
<div class="col-sm-2">
<input class='form-control' type='text' size='55' id='<?php echo $attr_name; ?>' name='<?php echo $attr_name; ?>' value='<?php if (isset($$attr_name)){echo htmlspecialchars($$attr_name, ENT_QUOTES, 'UTF-8');}?>' />
</div>
</div>
<?php endforeach; ?>
<!-- Buttons -->
<p>
<input type='submit' class="hidden" value='<?php eT("Add dummy tokens"); ?>' />
<input type='hidden' name='sid' value='$surveyid' />
</p>
</form>
</div>
</div>
</div>