Created
March 1, 2014 04:10
-
-
Save leonguyen/9285001 to your computer and use it in GitHub Desktop.
ad_user frm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% include ../header %> | |
| <% include ../admin/menu %> | |
| <% include ../admin/msg %> | |
| <div class="page-header"> | |
| <div class="btn-group pull-right"><% include button %></div> | |
| <h2><%=title%></h2> | |
| </div> | |
| <form id="frm" class="form" role="form" data-validate="parsley" method="post" enctype="multipart/form-data" action="/ad_user/save"> | |
| <div class="row"><div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtName">Username</label> | |
| <input type="text" class="form-control" id="txtName" name="txtName" placeholder="Username" autofocus autocomplete="off" data-required="true" data-minlength="3" data-remote-method="POST" data-remote="/ad_user/chkName/<%=typeof(mr)!='undefined'?mr.uId:'0'%>" <%=typeof(mr)!='undefined'&&mr.uId==sess.uId==1?'readonly="readonly"':''%> value="<%=typeof(mr)!='undefined'?mr.uName:''%>"> | |
| </div> | |
| <div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtEmail">Email</label> | |
| <input type="text" class="form-control" id="txtEmail" name="txtEmail" placeholder="Email" data-required="true" data-type="email" data-remote-method="POST" data-remote="/ad_user/chkEmail/<%=typeof(mr)!='undefined'?mr.uId:'0'%>" value="<%=typeof(mr)!='undefined'?mr.uEmail:''%>"> | |
| </div></div> | |
| <div class="row"><div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtPass">Password</label> | |
| <input type="password" class="form-control" id="txtPass" name="txtPass" placeholder="Password" autocomplete="off" <%=typeof(mr)!='undefined'?'':'data-required="true"'%> data-minlength="3"> | |
| </div> | |
| <div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtCPass">Confirm password</label> | |
| <input type="password" class="form-control" id="txtCPass" name="txtCPass" placeholder="Password" autocomplete="off" <%=typeof(mr)!='undefined'?'':'data-required="true"'%> data-minlength="3" data-equalto="#txtPass"> | |
| </div></div> | |
| <div class="row"><div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtFName">Full name</label> | |
| <input type="text" class="form-control" id="txtFName" name="txtFName" placeholder="Full name" data-minlength="3" value="<%=typeof(mr)!='undefined'?JSON.parse(mr.uData).FName:''%>"></div> | |
| <div class="col-md-6 form-group"> | |
| <label class="control-label" for="txtDesc">Description</label> | |
| <textarea class="form-control" rows="3" id="txtDesc" name="txtDesc" placeholder="Description" data-minlength="3"><%=typeof(mr)!='undefined'?mr.uDesc:''%></textarea> | |
| </div></div> | |
| <div class="row"><div class="col-md-6 form-group"> | |
| <label class="control-label" for="fiAvatar">Avatar</label> | |
| <input type="file" class="form-control" id="fiAva" name="fiAva" placeholder="Avatar"> | |
| <input type="hidden" id="hdAva" name="hdAva" value="<%=typeof(mr)!='undefined'?JSON.parse(mr.uData).Avatar:''%>"> | |
| <img data-src="holder.js/140x140" class="img-thumbnail" alt="140x140" style="width: 140px; height: 140px;<%=typeof(mr)=='undefined'||!JSON.parse(mr.uData).Avatar?';display:none':''%>" src="/uploads/<%=typeof(mr)!='undefined'?JSON.parse(mr.uData).Avatar:''%>"> | |
| </div> | |
| <div class="col-md-6 form-group"> | |
| <label class="control-label" for="selCo">Company</label> | |
| <select class="form-control" id="selCo" name="selCo"> | |
| <option value="">Select Company</option> | |
| <% if(typeof(lstComp)!='undefined'){ lstComp.forEach(function(ml){ %> | |
| <option value="<%=ml.cId?ml.cId:''%>" <%=ml.cId&&typeof(mr)!='undefined'&&ml.cId==mr.cId?'selected="selected"':''%>><%=ml.cCode?ml.cCode:''%></option> | |
| <% });}//lstComp %> | |
| </select> | |
| <label class="control-label" for="selBr">Branch</label> | |
| <select class="form-control" id="selBr" name="selBr"> | |
| <option value="">Select Branch</option> | |
| <% if(typeof(lstBr)!='undefined'){ lstBr.forEach(function(ml){ %> | |
| <option value="<%=ml.bId?ml.bId:''%>" <%=ml.bId&&typeof(mr)!='undefined'&&ml.bId==mr.bId?'selected="selected"':''%>><%=ml.bCode?ml.bCode:''%></option> | |
| <% });}//lstBr %> | |
| </select> | |
| </div></div> | |
| <div class="row"><div class="col-md-6 form-group"> | |
| </div> | |
| <div class="col-md-6 form-group" <%=typeof(mr)!='undefined'&&mr.uId==sess.uId?'style=display:none':''%>> | |
| <label class="control-label" for="selActive">Status</label> | |
| <div class="radio"> | |
| <label><input type="radio" name="rdoStatus" value="1" checked>Enable</label> | |
| </div> | |
| <div class="radio"> | |
| <label><input type="radio" name="rdoStatus" value="0">Disable</label> | |
| </div> | |
| </div></div> | |
| <% if(typeof(mr)!='undefined'){%><% include frm_detail %><%}//if mr%> | |
| <input type="hidden" id="hdId" name="hdId" value="<%=typeof(mr)!='undefined'?mr.uId:''%>"> | |
| <input type="hidden" id="hdSave" name="hdSave"> | |
| </form> | |
| <div class="page-header"> | |
| <center><div class="btn-group"><% include button %></div></center> | |
| </div> | |
| <% include frm_js %> | |
| <% include js %> | |
| <% include ../footer %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment