File size: 785B
<div id="comments_edit_form" class="modal_form">
<form action="<?php echo $action; ?>" method="post" class="modal">
<?php echo html_csrf_token(); ?>
<?php echo html_input('hidden', 'save', 1); ?>
<div class="field" id="f_content"><?php echo html_editor('content', $comment['content']); ?></div>
<div class="buttons">
<?php echo html_submit(LANG_SAVE); ?>
</div>
</form>
</div>
<script type="text/javascript">
$(function (){
$('#comments_edit_form form').on('submit', function (){
return icms.forms.submitAjax(this);
});
});
function successSaveComment (form, result){
$('#'+result.comment_id+' .comment_text_edit').html(result.text);
icms.modal.close();
}
</script>