75 lines
3.4 KiB
HTML
Executable File
75 lines
3.4 KiB
HTML
Executable File
{{include file="public/header" /}}
|
|
|
|
<!-- right content start -->
|
|
<div class="content-right">
|
|
<div class="content">
|
|
<!-- form start -->
|
|
<form class="am-form form-validation view-save" action="{{:MyUrl('admin/admin/save')}}" method="POST" request-type="ajax-url" request-value="{{:MyUrl('admin/admin/index')}}">
|
|
<legend>
|
|
<span class="am-text-default">
|
|
{{if empty($data['id'])}}
|
|
管理员添加
|
|
{{else /}}
|
|
管理员编辑
|
|
{{/if}}
|
|
</span>
|
|
<a href="{{:MyUrl('admin/admin/index')}}" class="am-fr am-text-sm am-margin-top-xs am-icon-mail-reply"> 返回</a>
|
|
</legend>
|
|
<div class="am-form-group">
|
|
<label>用户名</label>
|
|
<input type="text" placeholder="用户名" name="username" pattern="{{:lang('common_regex_username')}}" data-validation-message="用户名格式 5~18 个字符(可以是字母数字下划线)" class="am-radius" {{if !empty($data)}}value="{{$data.username}}" disabled{{/if}} required />
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>登录密码</label>
|
|
<input type="password" placeholder="登录密码" name="login_pwd" pattern="{{:lang('common_regex_pwd')}}" data-validation-message="密码格式 6~18 个字符" class="am-radius" {{if empty($data)}}required{{/if}} />
|
|
</div>
|
|
<div class="am-form-group">
|
|
<label>手机号码</label>
|
|
<input type="text" placeholder="手机号码" name="mobile" pattern="{{:lang('common_regex_mobile')}}" data-validation-message="手机号码格式错误" class="am-radius" {{if !empty($data)}}value="{{$data.mobile}}"{{/if}} />
|
|
</div>
|
|
{{if !isset($data['id']) or $admin['id'] neq $data['id']}}
|
|
<div class="am-form-group">
|
|
<label>权限组</label>
|
|
<select class="am-radius chosen-select" name="role_id" data-validation-message="请选择所属角色组" required>
|
|
<option value="">可选择...</option>
|
|
{{foreach $role as $v}}
|
|
<option value="{{$v.id}}" {{if isset($data['role_id']) and $data['role_id'] eq $v['id']}}selected{{/if}}>{{$v.name}}</option>
|
|
{{/foreach}}
|
|
</select>
|
|
</div>
|
|
{{/if}}
|
|
{{include file="lib/gender" /}}
|
|
|
|
<!-- 插件扩展数据 start -->
|
|
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
|
<div class="plugins-tag">
|
|
<span>plugins_view_admin_admin_save</span>
|
|
</div>
|
|
{{/if}}
|
|
{{if !empty($plugins_view_admin_admin_save_data) and is_array($plugins_view_admin_admin_save_data)}}
|
|
<div class="am-alert am-alert-secondary">
|
|
<label class="am-text-sm am-text-warning">该区域为插件扩展数据,请按照插件文档填写相应的值</label>
|
|
<div>
|
|
{{foreach $plugins_view_admin_admin_save_data as $hook}}
|
|
{{if is_string($hook) or is_int($hook)}}
|
|
{{$hook|raw}}
|
|
{{/if}}
|
|
{{/foreach}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<!-- 插件扩展数据 end -->
|
|
|
|
<div class="am-form-group am-form-group-refreshing">
|
|
<input type="hidden" name="id" {{if !empty($data['id'])}}value="{{$data.id}}"{{/if}} />
|
|
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
|
</div>
|
|
</form>
|
|
<!-- form end -->
|
|
</div>
|
|
</div>
|
|
<!-- right content end -->
|
|
|
|
<!-- footer start -->
|
|
{{include file="public/footer" /}}
|
|
<!-- footer end --> |