
<script>
function OpenResetUserPasswordButtonHtml(){return HomeMenuButtons('assets/resetpassword.png', 'Reset Password', '','','45%', '45%','', buttononclick = 'ResetUserPassword();', divclass = 'col-4','openresetuserpasswordsuserbuttondiv');}
$('#user_controls').append(OpenResetUserPasswordButtonHtml());





 
    function ResetUserPasswordNow() {
if (!$('#reset-password-new').val() || $('#reset-password-new').val().trim().length <6 ){
    ModalQuickDismiss('Incorrect Password Input','Password must be 6 characters or more.',modalid='modal-reset-user-password-success');     
}
        function ResetUserPasswordResult(response) {
            if (response===true) {
                ModalQuickDismiss('Password Changed','Password Reset Successful. Please inform user',modalid='modal-reset-user-password-success',modaltohide='reset-user-password-dialog',functiontodo='',conditiontrue=true);     
                modalhide('reset-user-password-dialog');
            } else {
                ModalQuickDismiss('Failed','Password was not reset.<br><br>'+response,modalid='modal-reset-user-password-success',modaltohide='',functiontodo='',conditiontrue=true);     
            }
          
        }



        AjaxDo('?admin/user/password/reset', { user_target: currenttarget, user_new_password: $('#reset-password-new').val() }, ResetUserPasswordResult, null, reqtype = 'POST');
    }
    function ResetUserPassword() {
let modalbody = dualcolrow('New Password','<input type="password" class="form-control" id="reset-password-new">');
ModalContinueCancel('reset-user-password-dialog','Reset Password',modalbody,'ResetUserPasswordNow();',cancelbuttontext='Cancel',continuebuttontext='Reset',continuebuttoncss='btn btn-danger',cancelbuttoncss='btn btn-warning');
    
    }


    

    $(document).ready(function () {



    });



</script>