<form name="vis_forum_comment_form<? echo $comment[0]['comment_id']; ?>" id="vis_forum_comment_form<? echo $comment[0]['comment_id']; ?>" class="form-horizontal" method="post">
	 <input type="hidden" name="vis_comment_id" value="<? echo $comment[0]['comment_id']; ?>" />
	  <input type="hidden" name="vis_topic" value="<? echo $operation['vis_topic']; ?>" />
	   <input type="hidden" name="vis_topic_id" value="<? echo $operation['vis_topic_id']; ?>" />
	 <div >
                           <div class="col-sm-12"><textarea name="vis_forum_comment_details<?php echo $comment[0]['comment_id']; ?>" id="vis_forum_comment_details<?php echo $comment[0]['comment_id']; ?>" class="form-control"  data-minwords="6" rows="2"><?php echo $comment[0]['content']; ?></textarea>
                           </div>
                        </div>
                        
                        <div >
                           <div class="col-sm-12">
                              <div class="col-sm-8 p-l-none" id="vis_forum_comment_attachments">
                                 <?
                                
                                    $atts='';
                                    if($comment[0]['attachment']!=-1) {
                                    	for($i=0;$i<count($comment[0]['attachment']);$i++) {
                                    		$atts.=$comment[0]['attachment'][$i]['attachment_id'].','; 
                                    		echo '<div class="btn-group wrapper-xxs"><label class="btn btn-xs alert-success">'.$comment[0]['attachment'][$i]['file_name'].'</label><button class="btn btn-xs alert-success" type="button" data-dismiss="alert" onclick=\'$(this).parent().remove();vis_remove_attachment('.$comment[0]['attachment'][$i]['attachment_id'] .',"vis_fattachments",'.$comment[0]['comment_id'].');\'><i class="vh vh-cross"></i></button></div>';
                                    	}
                                     }
                                    ?>
                              </div>
                              <div class="col-sm-4 p-r-none text-right">
                                 <input type="file" name="files[]" multiple="multiple" class="filestyle" data-icon="false" data-classButton="btn btn-link link" data-buttonText="<? echo $vis_language['TXTATTACHFILE']; ?>" data-input="false" onchange="$(this).visExecution('upload_file', {'vis_static_area':'#vis_forum_comment_attachments', 'vis_form':'vis_forum_comment_form<?php echo $comment[0]['comment_id']; ?>', 'vis_form_attachment_area':'#vis_attachments'});" style="display:none;">
                                 <input type="hidden" name="vis_location" value="<? echo VIS_DOMAIN; ?>" />
                                 <input type="hidden" name="vis_attachments" id="vis_attachments" value="" />  
                                 <input type="hidden" name="vis_parent_type" value="10" />
                              </div>
                           </div>
                        </div>
                        <div class="line b-b line-lg pull-in"></div>
                        
                        <div >
                           <div class="pull-right">
                              <input type="hidden" id="vis_domain" name="vis_domain" value="<? echo $forumTopic['domain_id']; ?>" />
                              <button type="button" class="btn btn-default" onclick="$('#vis_workpanel_div').visExecution('load_area', {'vis_module':'forums', 'vis_operation':'topic_details','vis_action':'#/forums/topic_details/<? echo $operation['vis_topic'];?>/<? echo $operation['vis_topic_id']; ?>', 'vis_topic_id':'<? echo $operation['vis_topic_id']; ?>'})"><? echo $vis_language['TXTCANCEL']; ?></button>  
                              <button type="button" class="btn btn-primary m" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'forums', 'vis_operation':'update_forum_comment', 'vis_form':'vis_forum_comment_form<? echo $comment[0]['comment_id']; ?>'})"><? echo $vis_language['TXTUPDATE']; ?></button>
                           </div>
                        </div>
 </form>
<script>
<? if(!defined('VIS_HTML_EDITOR') || VIS_HTML_EDITOR==1) { ?>
 $(function(){
   $('#vis_forum_comment_details<?php echo $comment[0]['comment_id']; ?>').redactor({
   maxHeight: '180px',
   minHeight: 180,
   deniedTags: ['html', 'head', 'link', 'body', 'meta', 'script','applet'],
   imageUpload: "index.php?vis_tmpst="+new Date().getTime()+"&vis_module=ticket&vis_operation=upload_file&vis_static_area=editor_image_upload",         
   imageUploadParam: 'files',
   plugins: ['source'],
   imageUploadErrorCallback: function(json)
   {
   	 $("#vis_global_msg_div").show();
   	 document.getElementById("vis_global_msg_div").innerHTML = json.message;
   	 setTimeout( function(){ $("#vis_global_msg_div").hide().html(''); }, 10000);
   }
   });
   });
   <? }?>
</script>
<script src="<?= VIS_PATH_SCRIPT; ?>file-input/bootstrap-filestyle.min.js"></script>
