123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- {template 'common/header'}
- {template 'profile/common'}
- <ul class="nav nav-tabs">
- <li {if empty($id)}class="active"{/if}><a href="{url 'profile/fields'}">字段管理</a></li>
- {if !empty($id)}<li class="active"><a href="{php echo url ('profile/fields/post', array('id' => $id));}">编辑字段</a></li>{/if}
- </ul>
-
- {if $do == 'display'}
- <form action="" method="post">
- <div class="panel panel-default">
- <div class="panel-heading">
- 字段管理
- </div>
- <div class="panel-body table-responsive">
- <table class="table table-hover">
- <thead class="navbar-inner">
- <tr>
- <th>排序</th>
- <th>字段</th>
- <th>标题</th>
- <th>是否启用</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- {loop $account_member_fields $field}
- <tr>
- <td>
- <input type="text" class="form-control" style="width: 50%;" name="displayorder[{$field['fieldid']}]" value="{$field['displayorder']}" />
- <input type="hidden" name="id[{$field['fieldid']}]" value="{$field['id']}" />
- <input type="hidden" name="fieldid[{$field['fieldid']}]" value="{$field['fieldid']}" />
- <input type="hidden" name="title[{$field['fieldid']}]" value="{$field['title']}" />
- </td>
- <td>{$field['field']}</td>
- <td>{$field['title']}</td>
- <td>
- <input type="checkbox" name="available[{$field['fieldid']}]" value="1" {if $field['available']} checked {/if} />
- </td>
- <td>
- {if !empty($field['id'])}
- <a href="{php echo url('profile/fields/post', array('id' => $field['id']))}" title="编辑" class="btn btn-primary btn-sm">编辑</a>
- {/if}
- </td>
- </tr>
- {/loop}
- <tr>
- <td></td>
- <td></td>
- <td></td>
- <td>
- <input type="checkbox" id="selectAll" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});">
- <a class="btn btn-success btn-sm" style="margin-left: -25px;" onclick="$('#selectAll').click();">全选</a>
- </td>
- <td></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div>
- <button type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交">提交</button>
- <input type="hidden" name="token" value="{$_W['token']}" />
- </div>
- </div>
- </form>
-
- {elseif $do == 'post'}
- <div class="panel panel-default">
- <div class="panel-heading">
- 编辑字段
- </div>
- <div class="panel-body">
- <form class="form-horizontal form" action="" method="post">
- <input type="hidden" name="id" value="{$field['id']}">
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">排序</label>
- <div class="col-sm-10 col-xs-12">
- <input type="text" class="form-control" name="displayorder" value="{$field['displayorder']}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">名称</label>
- <div class="col-sm-10 col-xs-12">
- <input type="text" class="form-control" name="title" value="{$field['title']}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">启用</label>
- <div class="col-sm-10 col-xs-12">
- <label for="radio_1" class="radio-inline">
- <input type="radio" name="available" id="radio_1" value="1" {if empty($field) || $field['available'] == 1} checked{/if} /> 是
- </label>
- <label for="radio_0" class="radio-inline">
- <input type="radio" name="available" id="radio_0" value="0" {if !empty($field) && $field['available'] == 0} checked{/if} /> 否
- </label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
- <div class="col-sm-10 col-xs-12">
- <input type="submit" class="btn btn-primary" name="submit" />
- <input type="hidden" name="token" value="{$_W['token']}" />
- </div>
- </div>
- </form>
- </div>
- </div>
- {/if}
-
- {template 'common/footer'}
|