<? 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['TXTPROPERTIES']; ?></h4>
		</div>
		<div class="modal-body">
			<div class="row">				
				<div class="col-sm-12">
					<form class="form-horizontal" role="form" name="vis_client_properties_form" id="vis_client_properties_form" method="post">
							<div class="form-group">
							   <label class="col-sm-3 control-label p-d-sm"><? echo $vis_language['TXTSUBJECT']; ?></label>
							   <div class="col-sm-9">
								  <input class="form-control input-sm" type="text" name="vis_subject" id="vis_subject" value="<? echo htmlspecialchars($releases_details['subject']); ?>">
							   </div>
							</div>
							
							<div class="form-group">
							   <label class="col-sm-3 control-label p-d-sm"><? echo $vis_language['TXTEMAIL']; ?></label>
							   <div class="col-sm-9">
								  <input class="form-control input-sm" type="text" name="vis_email" id="vis_email" value="<? echo $releases_details['email']; ?>">
								  <script type="text/javascript">
									$(document).ready(function() {
										$("#vis_email").tokenInput(
											"index.php?vis_module=problem&vis_operation=get_staff",
											{
												theme: "facebook",
												searchDelay: 500,
												minChars: 3,
												queryParam: "vis_data",
												propertyToSearch: "email",
												tokenValue: "email",
												tokenLimit: 1,
												resultsFormatter: function(item){ return "<li>" + "<div style='display: inline-block; padding-left: 10px;'><div class='full_name'>" + item.full_name + " < " + item.email + " ></div></div></li>" },
												tokenFormatter: function(item) { return "<li><p>" + item.email + "</p></li>" }
											}
										);
										$("div.token-input-dropdown-facebook").css('width',$(".token-input-list-facebook").width()+2+'px');
										$("#vis_email").tokenInput("add", {id: '<? echo $message_info['staff_id']; ?>', email: "<? echo $releases_details['email']; ?>"});
									});
									</script>
							   </div>
							</div>
							<input type="hidden" name="vis_release_id" value="<? echo $message_info['release_id']; ?>" /><input type="hidden" name="vis_staff_id" value="<? echo $message_info['staff_id']; ?>" />
							<input type="hidden" name="vis_domain" value="<? echo $releases_details['domain_id']; ?>" />
					</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':'releases', 'vis_operation':'update_release_staff_properties', 'vis_form':'vis_client_properties_form'});"><?= $vis_language['TXTUPDATE']; ?></a>
		</div>
	</div>
</div>
