<? 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['TXTOPENNEWPROBLEM']; ?></h4>
        </div>
        <div class="modal-body">
            <div class="row">
                <div class="col-sm-12">
                    <form action="index.php" role="form" class="form-horizontal" name="vis_problem_first_form" id="vis_problem_first_form">
                        <div class="form-group">
                            <label class="col-sm-3 control-label txt_nowrap"><? echo $vis_language['TXTDEPARTMENT']; ?></label>
                            <div class="col-sm-9">
                                <select name="vis_department" id="vis_department_new" class="form-control input-sm selectpicker"<? if(count($departments)>10) echo ' data-live-search="true"';?>><?
									if($departments!=-1) for($i=0;$i<count($departments); $i++)
									echo '<option value="'.$departments[$i]['domain_id'].':'.$departments[$i]['department_id'].'">'.$departments[$i]['domain_name'].' :: '.$departments[$i]['department_name'].'</option>' ?>
									</select>
                            </div>
                        </div>
                        
                       
                    </form>
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <a class="btn btn-default" data-dismiss="modal"><? echo $vis_language['TXTCANCEL']; ?></a>
		
            <a class="btn btn-primary" data-dismiss="modal" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTOPENNEWPROBLEM']; ?>', {'vis_module':'problem','vis_operation':'new_problem','vis_domain_id':'<? echo $operation['vis_domain_id']; ?>','vis_internal_ticket':$('#vis_problem_first_form #vis_internal_ticket').is(':checked')?1:0, 'department_id': $('#vis_problem_first_form #vis_department_new').val(), 'channel_id': $('#vis_problem_first_form #vis_channel').val()<? if(isset($operation['vis_client_id']) && is_numeric($operation['vis_client_id'])) echo ", 'vis_client_id': ".$operation['vis_client_id']; if(isset($operation['vis_tweet_details']) && $operation['vis_tweet_details']!='') echo ", 'vis_tweet_details':'".$operation['vis_tweet_details']."'"; ?>});"><? echo $vis_language['TXTNEXT']; ?></a>
		</div>
    </div>
</div>
<script>$(".selectpicker").selectpicker();</script>
