update.php
2.34 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
<?php
use yii\helpers\Url;
$this->title = '编辑角色';
$this->params['breadcrumbs'][] = '系统管理';
$this->params['breadcrumbs'][] = ['label' => '角色管理', 'url' => ['/system/role/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<form action="<?=Url::toRoute(["/system/role/do-update", 'id' => $role->roleId])?>" id="roleForm" method="post">
<div class="panel panel-default">
<div class="panel-body">
<table class="panel-box-tb">
<thead>
<tr>
<th width="150"></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-right">
<b class="required">角色名称:</b>
</td>
<td>
<?php if ($supperRoleName == $role->name) :?>
<input type="hidden" value="<?= $role->name ?>" name="name" />
<?= $role->name ?>
<?php else:?>
<input type="text" value="<?= $role->name ?>" name="name" class="form-control required" style="width: 300px" >
<?php endif; ?>
</td>
</tr>
<tr>
<td class="text-right">
<b>角色描述:</b>
</td>
<td>
<textarea name="description" class="form-control" style="width: 300px" rows="5"><?= $role->description ?></textarea>
</td>
</tr>
<tr>
<td></td>
<td>
<button type="submit" class="btn btn-primary" id="save">提 交</button>
<a class="btn btn-default" href="<?=Url::toRoute(["/system/role/update", 'id' => $role->roleId])?>">重 置</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
<script>
// 表单提交验证
seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () {
var validator = $("#roleForm").validate({
});
});
</script>