/
_form.php
87 lines (81 loc) · 3.35 KB
/
_form.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
<?php
/* @var string $lang */
/* @var Quota $oQuota */
/* @var CActiveForm $form */
/* @var QuotaLanguageSetting[] $aQuotaLanguageSettings */
?>
<?php $form = $this->beginWidget('CActiveForm', ['id' => 'editquota',]); ?>
<?php
$this->widget('ext.AlertWidget.AlertWidget', ['errorSummaryModel' => $oQuota]);
?>
<div class="row">
<div class="col-xl-4">
<?php echo $form->hiddenField($oQuota, 'id'); ?>
<div class="mb-3">
<?php echo $form->labelEx($oQuota, 'name', ['class' => 'form-label ']); ?>
<div class=''>
<?php echo $form->textField($oQuota, 'name', ['class' => 'form-control']); ?>
<?php echo $form->error($oQuota, 'name'); ?>
</div>
</div>
<div class="mb-3">
<?php echo $form->labelEx($oQuota, 'qlimit', ['class' => 'form-label ']); ?>
<div class=''>
<?php echo $form->textField($oQuota, 'qlimit', ['class' => 'form-control']); ?>
<?php echo $form->error($oQuota, 'qlimit'); ?>
</div>
</div>
<div class="mb-3">
<?php echo $form->labelEx($oQuota, 'action', ['class' => 'form-label ']); ?>
<div class=''>
<?php echo $form->dropDownList($oQuota, 'action',
[
Quota::ACTION_TERMINATE => gT("Terminate survey"),
Quota::ACTION_CONFIRM_TERMINATE => gT("Allow user to modify their last answers before terminating the survey."),
],
['class' => 'form-select']); ?>
<?php echo $form->error($oQuota, 'action'); ?>
</div>
</div>
<div class="mb-3 col-md-6">
<?php echo $form->labelEx($oQuota, 'active', ['class' => 'form-label ']); ?>
<div>
<?php $this->widget('ext.ButtonGroupWidget.ButtonGroupWidget', [
'model' => $oQuota,
'attribute' => 'active',
'checkedOption' => $oQuota->active,
'selectOptions' => [
'1' => gT('Yes'),
'0' => gT('No'),
],
]); ?>
<?php echo $form->error($oQuota, 'active'); ?>
</div>
</div>
<div class="mb-3 col-md-6">
<?php echo $form->labelEx($oQuota, 'autoload_url', ['class' => 'form-label ']); ?>
<div>
<?php $this->widget('ext.ButtonGroupWidget.ButtonGroupWidget', [
'model' => $oQuota,
'attribute' => 'autoload_url',
'checkedOption' => $oQuota->autoload_url,
'selectOptions' => [
'1' => gT('Yes'),
'0' => gT('No'),
],
]); ?>
<?php echo $form->error($oQuota, 'autoload_url'); ?>
</div>
</div>
</div>
<div class="col-xl-8">
<?php $this->renderPartial('_form_langsettings',
[
'form' => $form,
'oQuota' => $oQuota,
'aQuotaLanguageSettings' => $aQuotaLanguageSettings,
]); ?>
<input type="submit" name="submit" class="d-none"/>
</div>
</div>
<?php $this->endWidget(); ?>