Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/modals/
Upload File :
Current File : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/modals/report-user.phtml

<div class="modal fade" id="report-user-modal" role="dialog">
	<div class="modal-dialog modal-md wow_mat_mdl">
		<form id="report-user-form-<?php echo $wo['user_profile']['user_id'];?>" method="post">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>
					<h4 class="modal-title"><svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.2297 14.6838L11.3801 14.5798C11.8509 14.2542 12.0864 14.0914 12.297 13.9169C13.4414 12.9684 14.21 11.6464 14.4658 10.1865C14.5129 9.91778 14.5373 9.63356 14.5863 9.06512L14.6116 8.77119C14.6926 7.8303 14.6845 6.88392 14.5875 5.94453L14.5574 5.65383C14.3876 4.00992 13.3784 2.5691 11.8872 1.84153C9.43528 0.645272 6.56504 0.645272 4.11315 1.84153C2.6219 2.5691 1.6127 4.00992 1.44289 5.65383L1.41286 5.94453C1.31583 6.88392 1.30775 7.8303 1.38874 8.77119L1.41404 9.06512C1.46297 9.63356 1.48744 9.91778 1.53452 10.1865C1.79034 11.6464 2.55896 12.9684 3.70333 13.9169C3.91393 14.0914 4.14941 14.2542 4.62022 14.5798L4.77067 14.6838C5.41077 15.1265 5.73085 15.3478 6.05162 15.5016C7.2829 16.0919 8.71742 16.0919 9.9487 15.5016C10.2695 15.3478 10.5895 15.1265 11.2297 14.6838Z" class="icon_main" stroke-width="1.5"></path><path d="M14.5863 9.06512L14.6116 8.77119C14.6926 7.8303 14.6845 6.88392 14.5875 5.94453L14.5574 5.65383C14.3876 4.00992 13.3784 2.5691 11.8872 1.84153C9.43529 0.645272 6.56504 0.645272 4.11315 1.84153C2.6219 2.5691 1.6127 4.00992 1.44289 5.65383L1.41286 5.94453C1.31583 6.88392 1.30775 7.8303 1.38874 8.77119L1.41404 9.06512C1.46297 9.63356 1.48744 9.91778 1.53452 10.1865C1.79034 11.6464 2.55896 12.9684 3.70333 13.9169C3.91393 14.0914 4.14941 14.2542 4.62022 14.5798L4.77067 14.6838C5.41077 15.1265 5.73085 15.3478 6.05162 15.5016" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="M9.47313 6.97168L6.52686 9.91796M9.47313 9.91796L6.52686 6.97168" class="icon_main" stroke-width="1.5" stroke-linecap="round"></path></svg> <?php echo $wo['lang']['report_user_text']; ?></h4>
				</div>
				<div class="modal-body report-textarea-<?php echo $wo['user_profile']['user_id'];?>" style="padding:0;">
					<div class="report_alert"></div>
					<div class="wow_form_fields">
						<select name="reason">
							<?php foreach ($wo['config']['report_reasons'] as $key => $value) { ?>
								<option value="<?php echo $value; ?>"><?php echo $wo['lang'][$value]; ?></option>
							<?php } ?>
						</select>
					</div>
					<div class="wow_form_fields">
						<textarea placeholder="<?php echo $wo['lang']['reason']?>" dir="auto" rows="5" name="text"></textarea>
					</div>
				    <input type="hidden" name="user" value="<?php echo $wo['user_profile']['user_id'];?>">
				</div>
				<div class="modal-footer" style="border: none">
					<div class="ball-pulse"><div></div><div></div><div></div></div>
					<button type="submit" class="btn main btn-mat" id="report-user-button"><?php echo $wo['lang']['report']; ?></button>
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">
	jQuery(document).ready(function($) {
		  var textarea = $('.report-textarea-<?php echo $wo['user_profile']['user_id'];?> textarea');
		  var text = textarea.val();
		$('#report-user-form-<?php echo $wo['user_profile']['user_id'];?>').ajaxForm({
	      url: Wo_Ajax_Requests_File() + '?f=reports&s=report_user',
	      beforeSubmit: function(arr, $form, options) { 
	     //  	if ($('.report-textarea-<?php echo $wo['user_profile']['user_id'];?>').find('textarea').val() == '') {
		    //   $('.report-textarea-<?php echo $wo['user_profile']['user_id'];?>').find('.report_alert').html("<div class='alert alert-danger'><?php echo $wo['lang']['reason_empty']; ?></div>");
		    //   return false;
		    // }
	      },
	      beforeSend: function() {
		  Wo_progressIconLoader($('#report-user-button'));
		  $('#report-user-modal').find('.ball-pulse').fadeIn(100);
	      },
	      success: function(data) {
	        if(data.status == 200 && data.code == 1) {
	        	$('.report-textarea-<?php echo $wo['user_profile']['user_id'];?>').find('.report_alert').html("<div class='alert alert-success'>"+data.message+"</div>");
	        	$('#report-user-modal').find('.ball-pulse').fadeOut(100);
	        	setTimeout(function () {
	        		$('#report-user-modal').modal('hide');
	        		location.reload();
	        	},2000);
		    }
		    else{
		    	$('#report-user-modal').find('.ball-pulse').fadeOut(100);
			    location.reload();
			    $('#report-user-modal').modal('hide');
		    }
	    }});
	});
</script>