update.php
2.1 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
$this->title = '编辑权限';
$this->params['breadcrumbs'][] = ['label' => '权限列表', 'url' => ['/system/perm/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<form action="<?php echo Url::toRoute(['/system/perm/do-update', 'id' => $perm->permId]); ?>" id="permForm" 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>
<input type="text" value="<?= $perm->name ?>" name="name" class="form-control required" style="width: 300px">
</td>
</tr>
<tr>
<td class="text-right" style="vertical-align: top">
<b>路由:</b>
</td>
<td>
<textarea name="routes" class="form-control" style="width: 600px;height: 200px"><?= $routes ?></textarea>
<p class="text-muted">注意:每行一个路由</p>
</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/perm/update", 'id' => $perm->permId])?>">重 置</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
<script>
// 表单提交验证
seajs.use("base/1.0.0/unit/validate/custom-1.0.0",function () {
var validator = $("#permForm").validate({
});
});
</script>