<commit_before><script type="text/javascript">
var rowNum = 0;
function addRow() {
	rowNum ++;
	var row = '<p id="rowNum'+rowNum+'"><input type="text" name="youtube[]" style="width:400px" value=""><a title="Delete" onclick="removeRow('+rowNum+');"><span class="glyphicon glyphicon-remove"></span></a></p>';
	jQuery('#itemrow').append(row);
}

function removeRow(rnum) {
	jQuery('#rowNum'+rnum).remove();
}
</script>

    
<?php
    if($this-> activity != null){
?>

<h1 class="page-title">Review <?php echo $this->activity->getName(); ?></h1>
<div class="row">
	<a href="../detail/<?php echo $this -> activity -> getId(); ?>">&laquo;Back</a><br />
</div>
<div class="col-lg-6">
    
    <form action="/admin/activities/review" method="post" role="form" id="reviewform" enctype="multipart/form-data">
        <input type="hidden" value="<?php echo $this -> activity -> getId();  ?>" name="activity_id" />
		
		<div class="form-group">
            <label for="general_rating">General</label>
            <input type="number" value="" name="general_rating" id="general_rating" data-min="1" data-max="5" class="rating" />
        </div>
		<div class="form-group">
            <label for="guidance_rating">Guidance</label>
            <input type="number" value="" name="guidance_rating" id="guidance_rating" data-min="1" data-max="5" class="rating" />
        </div>
		<div class="form-group">
            <label for="assesment_rating">Assesment</label>
            <input type="number" value="" name="assesment_rating" id="assesment_rating" data-min="1" data-max="5" class="rating" />
        </div>
		      
        <div class="form-group">
            <label for="text_review">Text review</label><br />
            <textarea style="width:500px; height: 150px;" id='text_review' name="text_review" required ></textarea>
        </div>
        <div class="form-group" id="itemrow">
            <label for="youtube">Youtube links</label><br />
            <p><input type="text" id='youtube' name="youtube[]" style="width:400px" value=""/><button class="btn btn-default btn-sm" type="button" onclick="addRow()"><span class="glyphicon glyphicon-plus"></span></button></p>
            <?php echo $this->errormessageyt;	 ?>
        </div>
        
        <div class="form-group">
  			<label for="uploads">Add Images</label>
			<input type="file" id='uploads' name="uploads[]" accept="image/*" multiple />
			<?php echo $this->errormessage;	 ?>
		</div>
		
        <div class="form-group">
            <input type="reset" class="btn btn-danger pull-left" value="Reset" />
            <input type="submit" class="btn btn-success pull-right" value="Submit Review"/>
        </div>
    </form>
</div>

<?php
    } else {
?>        
     <h1>Unknown Activity</h1>
     <p>There are no known activities with this ID, please try another...</p>    
<?php        
    }
?><commit_msg>translated activities review<commit_after><script type="text/javascript">
var rowNum = 0;
function addRow() {
	rowNum ++;
	var row = '<p id="rowNum'+rowNum+'"><input type="text" name="youtube[]" style="width:400px" value=""><a title="Delete" onclick="removeRow('+rowNum+');"><span class="glyphicon glyphicon-remove"></span></a></p>';
	jQuery('#itemrow').append(row);
}

function removeRow(rnum) {
	jQuery('#rowNum'+rnum).remove();
}
</script>

    
<?php
    if($this-> activity != null){
?>

<h1 class="page-title"><?php echo $this->translate("Review")?> <?php echo $this->activity->getName(); ?></h1>
<div class="row">
	<a href="../detail/<?php echo $this -> activity -> getId(); ?>">&laquo;<?php echo $this->translate("Back")?></a><br />
</div>
<div class="col-lg-6">
    
    <form action="/admin/activities/review" method="post" role="form" id="reviewform" enctype="multipart/form-data">
        <input type="hidden" value="<?php echo $this -> activity -> getId();  ?>" name="activity_id" />
		
		<div class="form-group">
            <label for="general_rating"><?php echo $this->translate("General")?></label>
            <input type="number" value="" name="general_rating" id="general_rating" data-min="1" data-max="5" class="rating" />
        </div>
		<div class="form-group">
            <label for="guidance_rating"><?php echo $this->translate("Guidance")?></label>
            <input type="number" value="" name="guidance_rating" id="guidance_rating" data-min="1" data-max="5" class="rating" />
        </div>
		<div class="form-group">
            <label for="assesment_rating"><?php echo $this->translate("Assessment")?></label>
            <input type="number" value="" name="assesment_rating" id="assesment_rating" data-min="1" data-max="5" class="rating" />
        </div>
		      
        <div class="form-group">
            <label for="text_review"><?php echo $this->translate("Text review")?></label><br />
            <textarea style="width:500px; height: 150px;" id='text_review' name="text_review" required ></textarea>
        </div>
        <div class="form-group" id="itemrow">
            <label for="youtube"><?php echo $this->translate("Youtube links")?></label><br />
            <p><input type="text" id='youtube' name="youtube[]" style="width:400px" value=""/><button class="btn btn-default btn-sm" type="button" onclick="addRow()"><span class="glyphicon glyphicon-plus"></span></button></p>
            <?php echo $this->errormessageyt;	 ?>
        </div>
        
        <div class="form-group">
  			<label for="uploads"><?php echo $this->translate("Add images")?></label>
			<input type="file" id='uploads' name="uploads[]" accept="image/*" multiple />
			<?php echo $this->errormessage;	 ?>
		</div>
		
        <div class="form-group">
            <input type="reset" class="btn btn-danger pull-left" value="Reset" />
            <input type="submit" class="btn btn-success pull-right" value="Submit Review"/>
        </div>
    </form>
</div>

<?php
    } else {
?>        
     <h1><?php echo $this->translate("Unknown activity")?></h1>
     <p><?php echo $this->translate("There are no known activities with this ID, please try another...")?></p>
<?php        
    }
?>
{'fraction_non_alphanumeric': 0.21217105263157895, 'fraction_numerical': 0.007894736842105263, 'mean_word_length': 3.494456762749446, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 193, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '667596', 'n_tokens_mistral': 1977, 'n_tokens_neox': 1905, 'n_words': 394}