<h4><?php echo $this->lang->line('video_title_comment') ?>: </h4>
<?php echo form_open("video/comment/$video_id") ?>
- <textarea name="comment" id="comment" rows="4" cols="56"><?php echo set_value('comment', '') ?></textarea>
+ <textarea name="comment" id="comment" rows="4" cols="56"><?php
+ if (validation_errors()):
+ echo set_value('comment', '');
+ endif;
+ ?></textarea>
<div><input type="button" id="button-post" value="<?php echo $this->lang->line('video_submit_post_comment') ?>" />
<span id="comment-chars-left">512</span> <?php echo $this->lang->line('ui_chars_left') ?>
<?php endif ?>
<script type="text/javascript">
-
- function updateCommentCharsLeft($textarea)
- {
-
- }
-
$(function() {
$('#button-post')
.click(function() {
function(data) {
$('#video-comments').html(data);
});
- $('#comment').val('');
});
$('.pagination')
$textarea.val($textarea.val().substring(0, 512));
$('#comment-chars-left').html('' + (512 - $textarea.val().length));
- console.log(event.type);
});
});
</script>
\ No newline at end of file