forked from gugoan/economizzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.php
78 lines (65 loc) · 2.54 KB
/
profile.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
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$this->title = Yii::t('user', 'Profile');
?>
<div class="user-default-profile">
<h2><?= Html::encode($this->title) ?></h2>
<hr/>
<?php foreach (Yii::$app->session->getAllFlashes() as $key=>$message):?>
<?php $alertClass = substr($key,strpos($key,'-')+1); ?>
<div class="alert alert-dismissible alert-<?=$alertClass?>" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<p><?=$message?></p>
</div>
<?php endforeach ?>
<?php $form = ActiveForm::begin([
'id' => 'profile-form',
'options' => ['class' => 'form-horizontal'],
'fieldConfig' => [
'template' => "{label}\n<div class=\"col-lg-3\">{input}</div>\n<div class=\"col-lg-7\">{error}</div>",
'labelOptions' => ['class' => 'col-lg-2 control-label'],
],
'enableAjaxValidation' => true,
]); ?>
<?= $form->field($profile, 'full_name') ?>
<?php echo $form->field($profile, 'language')->dropDownList([
'en' => Yii::t('app', 'English USA'),
'pt' => Yii::t('app', 'Brazilian Portuguese'),
'ru' => Yii::t('app', 'Russian'),
'ko' => Yii::t('app', 'Korean'),
'hu' => Yii::t('app', 'Magyar'),
'fr' => Yii::t('app', 'French'),
'cn' => Yii::t('app', 'Chinese'),
'de' => Yii::t('app', 'Deutsch'),
'es' => Yii::t('app', 'Spanish'),
'ca' => Yii::t('app', 'Catalan'),
'lt' => Yii::t('app', 'Lithuanian'),
]);
?>
<?php echo $form->field($profile, 'currencycode')->dropDownList([
'USD' => Yii::t('app', 'United States Dollar'),
'BRL' => Yii::t('app', 'Brazil Real'),
'EUR' => Yii::t('app', 'Euro'),
'RUB' => Yii::t('app', 'Russia Ruble'),
'KPW' => Yii::t('app', 'Korea'),
'CHF' => Yii::t('app', 'Swiss Franks'),
]);
?>
<?php echo $form->field($profile, 'decimalseparator')->dropDownList([
'.' => '.',
',' => ',',
]);
?>
<?php echo $form->field($profile, 'startpage')->dropDownList([
'cashbook/index' => Yii::t('app', 'Entries Page'),
'dashboard/overview' => Yii::t('app', 'Dashboard Page'),
]);
?>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<?= Html::submitButton('<i class="fa fa-pencil-square-o"></i> '.Yii::t('user', 'Update'), ['class' => 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
</div>