Example #1
0
 /** Page to add a closing */
 public function add()
 {
     $data['page_title'] = lang('closings');
     $data['locations'] = location_options($this->locationModel->get_all_locations());
     $this->load->view('templates/header', $data);
     $this->load->view('closing_add_view', $data);
     $this->load->view('templates/footer');
 }
echo form_open_multipart($action, array('class' => 'pure-form pure-form-aligned'));
?>

<?php 
echo form_fieldset($page_title);
echo form_input_and_label('name', $name, 'required');
echo form_input_and_label('type', $type, 'required');
echo form_input_and_label('description', $description, 'required');
?>
<p class="info"><?php 
echo lang('duration_info');
?>
</p>
<?php 
echo form_input_and_label('duration', $duration, 'required class="positive-integer"');
echo form_dropdown_and_label('location', location_options($locations), $location_id);
echo form_input_and_label('wbs_number', $wbs_number, 'required');
echo form_colorpicker('experiment_color', $experiment_color, 'required');
?>
<div class="pure-control-group">
<label><?php 
echo lang('period');
?>
</label>
<?php 
echo form_input('date_start', $date_start, 'id="from" readonly placeholder="' . lang('date_start') . '"');
?>
-
<?php 
echo form_input('date_end', $date_end, 'id="to" readonly placeholder="' . lang('date_end') . '"');
?>
">
		<?php 
foreach (participant_options($participants) as $id => $option) {
    echo '<option value="' . $id . '">' . $option . '</option>\\n';
}
?>
	</select>

	<br>

	<select class="chosen-select select-location" multiple data-placeholder="<?php 
echo lang('filter_location');
?>
">
		<?php 
foreach (location_options($locations) as $id => $option) {
    echo '<option value="' . $id . '">' . $option . '</option>\\n';
}
?>
	</select>

	<select class="chosen-select select-leader" multiple data-placeholder="<?php 
echo lang('filter_leader');
?>
">
		<?php 
foreach (leader_options($leaders) as $id => $option) {
    echo '<option value="' . $id . '">' . $option . '</option>\\n';
}
?>
	</select>