update.php
3.02 KB
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
<?php
use yii\helpers\Url;
$this->title = "编辑账号";
$this->params['breadcrumbs'][] = '系统管理';
$this->params['breadcrumbs'][] = ['label' => '账号管理', 'url' => Url::toRoute(['/system/account/index'])];
$this->params['breadcrumbs'][] = $this->title;
?>
<form action="<?php echo Url::toRoute(['/system/account/do-update', 'id' => $model->id]); ?>" id="accountForm" method="post" >
<div class="col-md-3 text-right" style="padding:5px 0px 0px 0px;">
<span class="text-danger"><span class=" glyphicon glyphicon-asterisk"></span></span>
<b>用户名</b>
</div>
<div class="col-md-6">
<input type="text" name="username" class="form-control required" placeholder="用户名" value="<?= $model->username ?>">
</div>
<div class="col-md-12" style="padding-top:15px;"></div>
<div class="col-md-3 text-right" style="padding:5px 0px 0px 0px;">
<span class="text-danger"><span class=" glyphicon glyphicon-asterisk"></span></span>
<b>姓名</b>
</div>
<div class="col-md-6">
<input type="text" name="realname" class="form-control required" placeholder="姓名" value="<?= $model->profile ? $model->profile->realname : '' ?>">
</div>
<div class="col-md-12" style="padding-top:15px;"></div>
<div class="col-md-3 text-right" style="padding:5px 0px 0px 0px;">
<span class="text-danger"><span class="glyphicon glyphicon-asterisk"></span></span>
<b>邮箱</b>
</div>
<div class="col-md-6">
<input type="text" name="email" class="form-control required email" placeholder="邮箱" value="<?= $model->profile ? $model->profile->email : '' ?>">
</div>
<div class="col-md-12" style="padding-top:15px;"></div>
<div class="col-md-3 text-right" style="padding:5px 0px 0px 0px;">
<span class="text-danger"><span class=" glyphicon glyphicon-asterisk"></span></span>
<b>手机</b>
</div>
<div class="col-md-6">
<input type="text" name="mobile" class="form-control required isMobile" placeholder="手机号码" value="<?= $model->profile ? $model->profile->mobile : '' ?>">
</div>
<div class="col-md-12" style="padding-top:15px;"></div>
<div class="col-md-3 text-right" style="padding:5px 0px 0px 0px;">
<b>是否启用</b>
</div>
<div class="col-md-6">
<input type="checkbox" name="is_enable" class="checkbox" <?php if ($model->is_enable) echo 'checked="checked"'; ?> value="1">
</div>
<div class="col-md-12" style="padding-top:15px;"></div>
<div class="col-md-3 text-right" >
</div>
<div class="col-md-6">
<button type="submit" class="btn btn-primary" id="save">提 交</button>
<a class="btn btn-default" href="<?=Url::toRoute(["/system/account/update", 'id' => $model->id])?>">重 置</a>
</div>
</form>
<script>
// 表单提交验证
seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () {
var validator = $("#accountForm").validate({
});
});
</script>