12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- {% extends "base.html" %}
- {% block title %}
- {% endblock %}
- {% block head %}
- <script type="text/javascript">
- var submitForm = function($dialog, $grid, $pjq) {
- if ($('form').form('validate')) {
- var url;
- if ($(':input[name="data.id"]').val().length > 0) {
- url = sy.contextPath + '/base/syrole!update.action';
- } else {
- url = sy.contextPath + '/base/syrole!save.action';
- }
- $.post(url, sy.serializeObject($('form')), function(result) {
- if (result.success) {
- $grid.datagrid('load');
- $dialog.dialog('destroy');
- } else {
- $pjq.messager.alert('提示', result.msg, 'error');
- }
- }, 'json');
- }
- };
- $(function() {
- if ($(':input[name="data.id"]').val().length > 0) {
- parent.$.messager.progress({
- text : '数据加载中....'
- });
- $.post(sy.contextPath + '/base/syrole!getById.action', {
- id : $(':input[name="data.id"]').val()
- }, function(result) {
- if (result.id != undefined) {
- $('form').form('load', {
- 'data.id' : result.id,
- 'data.name' : result.name,
- 'data.description' : result.description,
- 'data.seq' : result.seq
- });
- }
- parent.$.messager.progress('close');
- }, 'json');
- }
- });
- </script>
- {% endblock %}
- {% block body %}
- <body>
- <form method="post" class="form">
- <fieldset>
- <legend>角色基本信息</legend>
- <table class="table" style="width: 100%;">
- <tr>
- <th>编号</th>
- <td><input name="data.id" value="{{id}}" readonly="readonly" /></td>
- <th>角色名称</th>
- <td><input name="data.name" class="easyui-validatebox" data-options="required:true" /></td>
- </tr>
- <tr>
- <th>顺序</th>
- <td><input name="data.seq" class="easyui-numberspinner" data-options="required:true,min:0,max:100000,editable:false" style="width: 155px;" value="100" /></td>
- <th>角色描述</th>
- <td><textarea name="data.description"></textarea></td>
- </tr>
- </table>
- </fieldset>
- </form>
- </body>
- {% endblock %}
|