<?php echo Wo_LoadPage('forum/headers/header'); ?>
<div class="row" id="threadreply">
	<label class="col-md-2"></label>
	<div class="col-md-8">
		<div class="wow_content mt-0">
			<div class="wo_page_hdng pag_neg_padd pag_alone">
				<div class="wo_page_hdng_innr">
					<span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="currentColor" d="M10,9V5L3,12L10,19V14.9C15,14.9 18.5,16.5 21,20C20,15 17,10 10,9Z"></path></svg></span> <?php echo $wo['lang']['reply'];?> > <?php echo $wo['reply']['post_subject']; ?>
				</div>
			</div>
		</div>

		<div class="page-margin wow_content wow_sett_content">
			<form action="#" class="form" id="quotereply" method="post">
				<div id="quotereply-alert"></div>
				<div class="wow_form_fields">
					<label for="subject"><?php echo $wo['lang']['subject']; ?></label>
					<input type="text" name="subject" id="subject" value="<?php echo($wo['reply']['post_subject']); ?>">
				</div>
				<div class="wow_form_fields">
					<label for="newquotereply"><?php echo $wo['lang']['your_reply']; ?></label>
					<textarea id="newquotereply" name="content">[quote][b]<?php echo $wo['reply']['user_data']["username"]; ?> <?php echo $wo['lang']['wrote']; ?>:[/b][nl]<?php echo $wo['reply']['post_text']; ?>[/quote]</textarea>
				</div>
				<div class="text-center">
					<button class="btn btn-main btn-mat btn-mat-raised add_wow_loader" id="forum-search-btn" type="submit"><?php echo $wo['lang']['reply']; ?></button>
				</div>
			</form>
		</div>
		<div class="clear"></div>
	</div>
	<label class="col-md-2"></label>
</div>


<?php if (isset($wo['bbcodeditor']) && $wo['bbcodeditor']): ?>
<script>
	jQuery(document).ready(function($) {


		$('#quotereply').ajaxForm({

	      url: Wo_Ajax_Requests_File()  +  '?f=threadreply&tid=<?php echo $wo['reply']['thread_id']; ?>&fid=<?php echo $wo['reply']['forum_id']; ?>&q=1&hash=' + $('.main_session').val(),
	      beforeSend: function() {
	        Wo_progressIconLoader($('#quotereply').find('button'));
	      },
	      success: function(data) {
	        scrollToTop();
	        if (data['status'] == 200) {
	        	
	         	$("#quotereply-alert").html('<div class="alert alert-success">'+ data['message'] +'</div>');
	         	window.location = data.url;
	          
	        } else {
	        	
	         	$("#quotereply-alert").html('<div class="alert alert-danger">' + data['message'] + '</div>');
	        } 
	        Wo_progressIconLoader($('#quotereply').find('button'));
	      }
		});
		$('#newquotereply').bbcode();
		$("#newquotereply").autogrow({vertical: true, horizontal: false});

	});

</script>
	
<?php endif ?>

<?php echo Wo_LoadPage('forum/headers/footer'); ?>