/
personalsettings.php
103 lines (94 loc) · 4.44 KB
/
personalsettings.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
<?php
/**
* Personal settings edition
*/
?>
<div class="container-fluid welcome full-page-wrapper">
<h3 class="pagetitle"><?php eT("Your personal settings"); ?></h3>
<!-- form -->
<?php echo CHtml::form($this->createUrl("/admin/user/sa/personalsettings"), 'post', array('class' => 'form44 form-horizontal', 'id'=>'personalsettings')); ?>
<!-- Interface language -->
<div class="form-group">
<?php echo CHtml::label(gT("Interface language:"), 'lang', array('class'=>"col-sm-2 control-label")); ?>
<div class="col-sm-3">
<select id='lang' name='lang' class="form-control">
<option value='auto'<?php if ($sSavedLanguage == 'auto') { echo " selected='selected'"; } ?>>
<?php eT("(Autodetect)"); ?>
</option>
<?php foreach (getLanguageData(true, Yii::app()->session['adminlang']) as $langkey => $languagekind)
{ ?>
<option value='<?php echo $langkey; ?>'<?php if ($langkey == $sSavedLanguage) {
echo " selected='selected'";
} ?>>
<?php echo $languagekind['nativedescription']; ?> - <?php echo $languagekind['description']; ?>
</option>
<?php } ?>
</select>
</div>
</div>
<!-- HTML editor mode -->
<div class="form-group">
<?php echo CHtml::label(gT("HTML editor mode:"), 'htmleditormode', array('class'=>"col-sm-2 control-label")); ?>
<div class="col-sm-3">
<?php
echo CHtml::dropDownList('htmleditormode', Yii::app()->session['htmleditormode'], array(
'default' => gT("Default"),
'inline' => gT("Inline HTML editor"),
'popup' => gT("Popup HTML editor"),
'none' => gT("No HTML editor")
), array('class'=>"form-control"));
?>
</div>
</div>
<!-- Question type selector -->
<div class="form-group">
<?php echo CHtml::label(gT("Question type selector:"), 'questionselectormode', array('class'=>"col-sm-2 control-label")); ?>
<div class="col-sm-3">
<?php
echo CHtml::dropDownList('questionselectormode', Yii::app()->session['questionselectormode'], array(
'default' => gT("Default"),
'full' => gT("Full selector"),
'none' => gT("Simple selector")
), array('class'=>"form-control"));
?>
</div>
</div>
<!-- Template editor mode -->
<div class="form-group">
<?php echo CHtml::label(gT("Template editor mode:"), 'templateeditormode', array('class'=>"col-sm-2 control-label")); ?>
<div class="col-sm-3">
<?php
echo CHtml::dropDownList('templateeditormode', Yii::app()->session['templateeditormode'], array(
'default' => gT("Default"),
'full' => gT("Full template editor"),
'none' => gT("Simple template editor")
), array('class'=>"form-control"));
?>
</div>
</div>
<!-- Date format -->
<div class="form-group">
<?php echo CHtml::label( gT("Date format:"), 'dateformat', array('class'=>"col-sm-2 control-label")); ?>
<div class="col-sm-3">
<select name='dateformat' id='dateformat' class="form-control">
<?php
foreach (getDateFormatData(0,Yii::app()->session['adminlang']) as $index => $dateformatdata)
{
echo "<option value='{$index}'";
if ($index == Yii::app()->session['dateformat'])
{
echo " selected='selected'";
}
echo ">" . $dateformatdata['dateformat'] . '</option>';
}
?>
</select>
</div>
</div>
<!-- Buttons -->
<p>
<?php echo CHtml::hiddenField('action', 'savepersonalsettings'); ?>
<?php echo CHtml::submitButton(gT("Save settings",'unescaped'),array('class' => 'hidden')); ?>
</p>
<?php echo CHtml::endForm(); ?>
</div>