<div class="ma_page_content">
	<div class="ma_pc_inner">
		<div class="page_padding">
			<!-- Settings -->
				<div class="sett_page">
					<?php echo loadPage("settings/sidebar"); ?>
					<div class="st_content">
						<div class="st_form">
							<h3>{{LANG Change Password}}</h3>
							<form method="post" action="" id="general-form">
								<div class="alert alert-danger alert-empty" id="output-general-errors"></div>
								<div class="form-group mat_input">
									<label class="col-md-12 p-0" for="c_pass"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"></path></svg> {{LANG Current Password}}</label>
									<input type="password" name="c_pass" id="c_pass" autofocus="">
								</div>
								<div class="row">
									<div class="col-md-6 p-0">
										<div class="form-group mat_input">
											<label class="col-md-12" for="n_pass"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M14,12A2,2 0 0,1 16,10A2,2 0 0,1 18,12A2,2 0 0,1 16,14A2,2 0 0,1 14,12M8,12A2,2 0 0,1 10,10A2,2 0 0,1 12,12A2,2 0 0,1 10,14A2,2 0 0,1 8,12M2,12A2,2 0 0,1 4,10A2,2 0 0,1 6,12A2,2 0 0,1 4,14A2,2 0 0,1 2,12M22,5H20V19H22V5Z"></path></svg> {{LANG New Password}}</label>
											<div class="col-md-12">
												<input type="password" name="n_pass" id="n_pass">
											</div>
										</div>
									</div>
									<div class="col-md-6 p-0">
										<div class="form-group mat_input">
											<label class="col-md-12" for="rn_pass"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M14,12A2,2 0 0,1 16,10A2,2 0 0,1 18,12A2,2 0 0,1 16,14A2,2 0 0,1 14,12M8,12A2,2 0 0,1 10,10A2,2 0 0,1 12,12A2,2 0 0,1 10,14A2,2 0 0,1 8,12M2,12A2,2 0 0,1 4,10A2,2 0 0,1 6,12A2,2 0 0,1 4,14A2,2 0 0,1 2,12M22,5H20V19H22V5Z"></path></svg> {{LANG Repeat New Password}}</label>
											<div class="col-md-12">
												<input type="password" name="rn_pass" id="rn_pass">
											</div>
										</div>
									</div>
								</div>
								<div class="last-sett-btn modal-footer">
									<input type="hidden" id="user-id" name="user_id" value="{{USER id}}">
									<button type="submit" class="btn btn-primary btn-mat" id="btn-general-submit">{{LANG Change}}</button>
								</div>
							</form>
						</div>
					</div>
				</div>
			<!-- End Settings -->
		</div>
	</div>
</div>

<script>
$(document).ready(function() { 
    var options = { 
    	url: "{{CONFIG ajax_url}}/user/password?hash_id=" + getHashID(),
        beforeSubmit:  function () {
        	$('#output-general-errors').removeClass("alert-success").addClass('alert-danger');
        	$('#output-general-errors').empty();
        	$("#btn-general-submit").text("{{LANG Please wait..}}");
        }, 
        success: function (data) {
        	$("#btn-general-submit").text("{{LANG Change}}");
        	if (data.status == 200) {
        		$('#output-general-errors').removeClass("alert-danger").addClass('alert-success');
        		$('#output-general-errors').html(data.message);
        		setTimeout(function () {
        			$('#output-general-errors').html("");
        		}, 2000);
        	} else if (data.status == 400) {
        		var errros = data.errors.join("<br>");
        		$('#output-general-errors').html(errros);
        	} 
        }
    }; 
    $('#general-form').ajaxForm(options); 
}); 
</script>