<? global $vis_language;  ?>
<div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">&times;</button>
			<h4 class="modal-title"><? echo $vis_language['TXTNOTEADD']; ?></h4>
		</div>
		<div class="modal-body">
			<div class="row">				
				<div class="col-sm-12">
					<form class="form-horizontal" role="form" name="vis_note_form" id="vis_note_form" method="post">
						<div class="form-group">
							<label class="col-sm-2 control-label"><? echo $vis_language['TXTNOTEHEADERCOLOR']; ?></label>
							<div class="col-sm-10">
								<select class="form-control input-sm selectpicker" name="vis_note_header_bgcolor" id="vis_note_header_bgcolor">
									<option value="#fcf8e3" class="alert-warning txt_left m-n no-radius" selected="selected">Yellow</option>
									<option value="#dff0d8" class="alert-success txt_left m-n no-radius">Green</option>
									<option value="#f2dede" class="alert-danger txt_left m-n no-radius">Red</option>
									<option value="#d9edf7" class="alert-info txt_left m-n no-radius">Blue</option>
								</select>
						   </div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"></label>
						   <div class="col-sm-10">
							  <textarea name="vis_note" id="vis_note" class="form-control input-sm"></textarea>
						   </div>
						</div>
						<div class="form-group">
							<div class="col-sm-12">
							   <div class="col-sm-10 p-l-none" id="vis_new_ticket_attachments"></div>					
								<div class="col-sm-2">
									<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_new_ticket_attachments', 'vis_form':'vis_note_form', 'vis_form_attachment_area':'#vis_attachments'});" style="display:none;">
									<input type="hidden" name="vis_parent_type" value="3" />
									<input type="hidden" name="vis_attachments" id="vis_attachments" value="" />
									<input type="hidden" name="vis_changes_id" value="<? echo $message_info['changes_id']; ?>" />
									<input type="hidden" name="vis_staff_id" value="<? echo $message_info['staff_id']; ?>" />
									<input type="hidden" name="vis_domain_id" value="<?= $operation['vis_domain_id'];?>" />
								</div>
							</div>
						</div>							
					</form>
				</div>
			</div>
		</div>
		<div class="modal-footer m-n">
			<a class="btn btn-default" data-dismiss="modal"><? echo $vis_language['TXTCANCEL']; ?></a>			
			<a class="btn btn-primary" onclick="$(this).visExecution('submit_form',{'vis_module':'changes', 'vis_operation':'add_note', 'vis_form':'vis_note_form'});"><? echo $vis_language['TXTADD']; ?></a>
		</div>
	</div>
</div>
<script>
	function vis_remove_attachment(ticket_id){
		$("#vis_note_form #vis_attachments").val( $("#vis_note_form #vis_attachments").val().replace(ticket_id + ',', '') );
	}
	$(".selectpicker").selectpicker();
</script>
<script src="<?= VIS_PATH_SCRIPT; ?>file-input/bootstrap-filestyle.min.js"></script>
