123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <?php
- /* Smarty version 3.1.30, created on 2018-05-07 00:09:42
- from "D:\phpStudy\WWW\workorder\application\views\templates\user\add.html" */
- /* @var Smarty_Internal_Template $_smarty_tpl */
- if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
- 'version' => '3.1.30',
- 'unifunc' => 'content_5aef28c6de6bf8_10022339',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '43d83b2a77d4d783fe405c35c68c37e1042d5267' =>
- array (
- 0 => 'D:\\phpStudy\\WWW\\workorder\\application\\views\\templates\\user\\add.html',
- 1 => 1524940966,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- ),
- ),false)) {
- function content_5aef28c6de6bf8_10022339 (Smarty_Internal_Template $_smarty_tpl) {
- ?>
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <meta name="robots" content="noindex,nofollow">
- <title><?php echo $_smarty_tpl->tpl_vars['sys_name']->value;?>
- </title>
- <base href="<?php echo base_url();?>
- "/>
- <link href="static/css/bootstrap.min.css" rel="stylesheet">
- <link href="static/css/select2.min.css" rel="stylesheet">
- <link rel="stylesheet" href="static/css/style.css">
- <?php echo '<script'; ?>
- language="javascript" type="text/javascript"> var SITE_URL = "/";<?php echo '</script'; ?>
- >
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <?php echo '<script'; ?>
- src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"><?php echo '</script'; ?>
- >
- <![endif]-->
- </head>
- <body style="background: #fff; min-width: auto;">
- <form class="form-horizontal bv-form" role="form" id="validateform" name="validateform" action="" method="post" novalidate="novalidate">
- <input type="hidden" name="user_id" value="<?php echo $_smarty_tpl->tpl_vars['user_id']->value;?>
- ">
- <div class="panel panel-default">
- <div class="panel-body">
- <fieldset>
- <legend>新增用户</legend>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>用户名:</label>
- <div class="col-sm-4">
- <input name="username" type="text" datatype="s5-18" nullmsg="用户名不能为空!" ajaxurl="user/validate" class="form-control" id="username">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>密码:</label>
- <div class="col-sm-4">
- <input name="password" class="form-control" datatype="*8-40" nullmsg="密码不能为空!" id="password" placeholder="" size="45" type="password">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>确认密码:</label>
- <div class="col-sm-4">
- <input name="repassword" class="form-control" datatype="*" recheck="password" errormsg="您两次输入的账号密码不一致!" id="repassword" placeholder="" size="45" type="password">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>姓名:</label>
- <div class="col-sm-4">
- <input name="name" type="text" datatype="s" nullmsg="姓名不能为空!" class="form-control" id="name">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>手机:</label>
- <div class="col-sm-4">
- <input name="mobile" type="text" datatype="mobile" nullmsg="手机号不能为空!" ajaxurl="user/validate" class="form-control" id="mobile">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-1 control-label"><span>*</span>邮箱:</label>
- <div class="col-sm-4">
- <input name="email" type="email" datatype="e" nullmsg="邮箱不能为空!" ajaxurl="user/validate" class="form-control" id="email">
- </div>
- </div>
- <div class="form-group" id="branchs">
- <label class="col-sm-1 control-label">分支机构:</label>
- <div class="col-sm-4">
- <select class="form-control validate[required]" name="branch[]" id="branch" multiple>
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['branch']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['val']->value['branch_id'];?>
- "><?php echo $_smarty_tpl->tpl_vars['val']->value['branch_name'];?>
- </option>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- </select>
- </div>
- </div>
- <div class="form-group has-feedback">
- <label class="col-sm-1 control-label"><span>*</span>用户类型:</label>
- <div class="col-sm-4">
- <select class="form-control validate[required]" name="user_type" id="user_type">
- <?php
- $_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['user_types']->value, 'val', false, 'k');
- if ($_from !== null) {
- foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) {
- ?>
- <option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
- "><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
- </option>
- <?php
- }
- }
- $_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl);
- ?>
- </select>
- </div>
- </div>
- </fieldset>
- <div class="form-actions text-left">
- <button type="submit" id="dosubmit" class="btn btn-primary ">保存</button>
- <button type="button" id="cannel" class="btn btn-default">取消</button>
- </div>
- </div>
- </div>
- </form>
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/jquery.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/bootstrap.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/select2.full.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/Validform_v5.3.2.min.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- type="text/javascript" charset="utf-8" src="static/js/layer/layer.js"><?php echo '</script'; ?>
- >
- <?php echo '<script'; ?>
- language="javascript" type="text/javascript">
- $(function(){
- $("select").select2({
- minimumResultsForSearch: -1
- });
- $("#cannel").click(function () {
- parent.$('#mainFrameTabs').CloseTabs("tab11","tab6");
- })
- $("#user_type").change(function () {
- if($(this).val() == 1){
- $("#branchs").hide();
- }else{
- $("#branchs").show();
- }
- })
- $("#validateform").Validform({
- tiptype:function(msg,o){
- if(o.type == 3) {
- layer.tips(msg, o.obj, {
- tips: [1, '#ff6666'] //还可配置颜色
- });
- }
- },
- datatype:{
- 'mobile':/^[1][3,4,5,7,8][0-9]{9}$/
- },
- beforeSubmit:function(curform) {
- $("button").attr("disabled", "disabled");
- var data = $("#validateform").serializeArray();
- $.post("user/save", data, function (data) {
- layer.msg(data.msg, {icon: data.icon, time: 3000}, function () {
- if (data.code) {
- parent.$('#mainFrameTabs').CloseTabs("tab11","tab6");
- }else{
- $("button").removeAttr("disabled");
- }
- })
- })
- return false;
- }
- })
- })
- <?php echo '</script'; ?>
- >
- </body>
- </html><?php }
- }
|