mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-01-21 17:25:20 +08:00
81 lines
3.3 KiB
HTML
81 lines
3.3 KiB
HTML
<form id="pass" name="passform" class="form-horizontal form-horizontal-left" role="form" action="{MOD_URL}&op=password" method="post" onsubmit="editpass_submit(this);return false">
|
|
<input type="hidden" name="editpass" value="true" />
|
|
<input type="hidden" name="uid" value="$uid" />
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
|
<!--{if $showoldpassword>0}-->
|
|
<div class="row mb-3">
|
|
<label class="col-sm-2" for="password0" required>{lang original_password}</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" name="password0" class="form-control" autocomplete="off" id="password0" placeholder="{lang input_original_password}" data-chk="false">
|
|
<span id="chk_password0" class="help-msg"> <span id="suc_password0"></span> <kbd class="help-msg"></kbd> </span>
|
|
</div>
|
|
</div>
|
|
<!--{/if}-->
|
|
<div class="row mb-3">
|
|
<label class="col-sm-2" for="password">{lang new_password}</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" name="password" class="form-control" autocomplete="off" id="password" placeholder="" data-chk="false">
|
|
<span id="chk_password" class="help-msg"> <span id="suc_password"></span> <kbd class="help-msg"></kbd> </span>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label class="col-sm-2" for="password2">{lang new_password_confirm}</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" id="password2" class="form-control" name="password2" autocomplete="off" placeholder="" data-chk="false">
|
|
<span id="chk_password2" class="help-msg"> <span id="suc_password2"></span> <kbd class="help-msg"></kbd> </span>
|
|
</div>
|
|
</div>
|
|
<!--{if $secqaacheck || $seccodecheck}-->
|
|
<div class="row mb-3">
|
|
<label class="col-sm-2">{lang verification_code}</label>
|
|
<div class="col-sm-10">
|
|
<!--{template common/seccheck}-->
|
|
</div>
|
|
</div>
|
|
<!--{/if}-->
|
|
<dl>
|
|
<input type="submit" class="btn btn-primary" value="{lang save_changes}" >
|
|
</dl>
|
|
<script type="text/javascript">
|
|
var pwlength = "{$_G['setting']['pwlength']}";
|
|
var strongpw = eval('{$strongpw}');
|
|
var ignoreEmail = false;
|
|
if( jQuery('#password0').length>0 ){
|
|
jQuery('#password0').on('blur',function(){
|
|
if(jQuery(this).val()==''){
|
|
errormessage(jQuery(this),'{lang please_input_original_password}');
|
|
}else{
|
|
errormessage(jQuery(this),'');
|
|
}
|
|
return false;
|
|
});
|
|
}
|
|
checkPwdComplexity(document.getElementById('password'),document.getElementById('password2'));
|
|
|
|
function editpass_submit(form){
|
|
|
|
var error=0;
|
|
jQuery(form).find('.help-msg').each(function(){
|
|
if(!jQuery(this).hasClass('chk_right')){
|
|
jQuery(this).parent().find('input').trigger('blur').focus();
|
|
error=1;
|
|
return false;
|
|
}
|
|
});
|
|
if(error) return false;
|
|
var formdata = jQuery(form).serialize();
|
|
var url = jQuery(form).attr('action');
|
|
jQuery.post(url+'&returnType=json',formdata,function(data){
|
|
if(data['success']){
|
|
showmessage(data['success'],'success',1000,1);
|
|
window.setTimeout(function(){
|
|
location.href='user.php?mod=login&op=logging&action=login';
|
|
},3000);
|
|
|
|
}else if(data['error']){
|
|
showmessage(data['error'],'danger',2000,1);
|
|
}
|
|
},'json');
|
|
return false;
|
|
}
|
|
</script> |