12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <{include file="admin/permission/header.html"}>
- <{include file="admin/permission/nav.html"}>
- <div class="container">
- <p></p>
- <form role="form" method="post">
- <div class="form-group">
- <label><{$alias}>名称:</label>
- <input name="name" type="text" class="form-control" value="<{$resource.name}>">
- </div>
- <{if $type != 'dir'}>
- <div class="form-group">
- <label>所属目录:</label>
- <input type="text" class="form-control" value="<{$parent_resource.name}>" disabled>
- </div>
- <div class="form-group">
- <label>所属应用名称:</label>
- <div class="row-lsm">
- <input name="app_name" type="text" class="form-control" value="<{$resource.app_name}>">
- </div>
- </div>
- <div class="form-group">
- <label>所属控制器名称:</label>
- <div class="row-lsm">
- <input name="control_name" type="text" class="form-control" value="<{$resource.control_name}>">
- </div>
- </div>
- <div class="form-group">
- <label>所属行为名称:</label>
- <div class="row-lsm">
- <input name="action_name" type="text" class="form-control" value="<{$resource.action_name}>">
- <i>不输入action名称,即对整个控制器拥有所有权限。(不推荐)</i>
- </div>
- </div>
- <div class="form-group">
- <label>是否最终节点:<input name="is_end" type="checkbox" value="1" <{if $is_end}>checked<{/if}>/></label>
- </div>
- <input name="parent_id" type="hidden" value="<{$parent_resource.id}>" />
- <{if $resource}>
- <input name="cas_token" type="hidden" value="<{$resource.cas_token}>" />
- <{/if}>
- <{/if}>
-
- <div class="form-group">
- <input id="submit" type="submit" class="btn" value="提交" />
- </div>
- </form>
- </div>
- <script type="text/javascript">
- KISSY.use('node', function (S, Node) {
- var $ = S.all;
-
- $("#submit").on('click', function () {
- var name = $("input[name=name]").val();
- if (!name) {
- alert('请输入<{$alias}>名称');
- return false;
- }
-
- <{if $type != 'dir'}>
- var app_name = $("input[name=app_name]").val();
- if (!app_name) {
- alert('请输入应用名称');
- return false;
- }
-
- var control_name = $("input[name=control_name]").val();
- if (!control_name) {
- alert('请输入控制器名称');
- return false;
- }
- <{/if}>
- });
-
- });
- </script>
- <{include file="admin/permission/bottom.html"}>
|