示例#1
0
 /** Filters the testcats by test on the add page. */
 public function filter_testcats()
 {
     $test_id = $this->input->post('test_id');
     $testcats = $this->testCatModel->get_testcats_by_test($test_id, TRUE);
     echo form_dropdown_and_label('testcat', testcat_options($testcats));
 }
<?php 
echo $this->session->flashdata('message');
?>

<?php 
echo form_open($action, array('class' => 'pure-form pure-form-stacked'));
echo form_fieldset($page_title);
?>

<div class="pure-g-r">
    <?php 
echo form_dropdown_and_label('participant', participant_options($participants), $participant_id, '', TRUE, 'pure-u-1-3');
?>
    <?php 
echo form_dropdown_and_label('test', test_options($tests), $test_id, '', TRUE, 'pure-u-1-3');
?>
    <?php 
echo form_input_and_label('date', $date, 'id="score_datepicker" required', FALSE, 'pure-u-1-3');
?>
</div>

<?php 
echo form_fieldset_close();
?>

<!-- Below, the scores will be shown on selection of the test or participant -->
<?php 
echo form_fieldset(lang('scores'));
?>
<div id="scores">
<script type="text/javascript" src="js/date_range.js"></script>

<?php 
if (!isset($id)) {
    echo heading($page_title, 2);
}
?>

<!-- Form for adding impediments -->
<?php 
echo form_open('impediment/add_submit/' . (isset($participant) ? $participant->id : ''), array('class' => 'pure-form'));
echo form_fieldset(lang('add_impediment'));
echo $this->session->flashdata('impediment_message');
echo form_input('from', '', 'id="from" readonly placeholder="' . lang('from_date') . '"');
echo form_input('to', '', 'id="to" readonly placeholder="' . lang('to_date') . '"');
echo form_input('comment', '', 'placeholder="' . lang('comment') . '"');
if (isset($participants)) {
    echo br(2);
    echo form_dropdown_and_label('participant', $participants, array(), 'class="chosen-select"');
    echo br(2);
}
?>

<?php 
echo form_submit_only();
echo form_fieldset_close();
echo form_close();
echo validation_errors();
<?php 
echo $this->session->flashdata('message');
?>

<?php 
echo form_open($action, array('class' => 'pure-form pure-form-aligned'));
echo form_fieldset($page_title);
?>

<?php 
if ($new_percentile) {
    echo form_dropdown_and_label('test', test_options($tests), $test_id);
    if (!empty($testcat_id)) {
        echo form_dropdown_and_label('testcat', testcat_options($testcats), $testcat_id);
    } else {
        echo form_dropdown_and_label('testcat', array(), array(), 'disabled');
    }
} else {
    echo form_input_and_label('test', $test->name, 'readonly');
    echo form_input_and_label('testcat', testcat_code_name($testcat), 'readonly');
}
?>
<div class="pure-control-group">
<?php 
echo form_label(lang('gender'), 'gender');
echo form_radio_and_label('gender', Gender::Female, $gender, gender(Gender::Female));
echo form_radio_and_label('gender', Gender::Male, $gender, gender(Gender::Male));
?>
</div>
<?php 
echo form_input_and_label('age', $age, 'class="positive-integer"');
	$( "#appointment" ).attr({
		readOnly : true
	});
});
</script>

<?php 
echo heading(lang('participation'), 2);
?>

<p class="warning"><?php 
echo lang('participation_no_restrictions');
?>
</p> 
<?php 
echo $this->session->flashdata('message');
?>

<?php 
echo form_open($action, array('class' => 'pure-form pure-form-aligned'));
?>

<?php 
echo form_fieldset($page_title);
echo form_dropdown_and_label('experiment', $experiments, array(), 'class="chosen-select"');
echo form_dropdown_and_label('participant', $participants, array(), 'class="chosen-select"');
echo form_dropdown_and_label('leader', $leaders, array(), 'class="chosen-select"');
echo form_input_and_label('appointment', '', 'placeholder= "' . lang('appointment') . '" id="appointment"');
echo form_controls();
echo form_fieldset_close();
echo form_close();
<?php 
echo form_multiselect_and_label('prerequisite', $experiments, isset($current_prerequisite_ids) ? $current_prerequisite_ids : array());
?>
<p class="info"><?php 
echo lang('excludes_info');
?>
</p>
<?php 
echo form_multiselect_and_label('excludes', $experiments, isset($current_exclude_ids) ? $current_exclude_ids : array());
?>
<p class="info"><?php 
echo lang('combination_info');
?>
</p>
<?php 
echo form_dropdown_and_label('combination', $experiments, isset($current_combination_ids) ? $current_combination_ids : array());
?>

<?php 
echo form_fieldset(lang('attachments'));
?>
<div class="pure-control-group">
<?php 
echo form_label(lang('attachment'), 'attachment');
if ($attachment) {
    echo '<em>' . $attachment . '</em> ';
    echo anchor(array('experiment/download_attachment', $id, 'attachment'), lang('download'));
    echo ' ';
    echo anchor(array('experiment/remove_attachment', $id, 'attachment'), lang('remove'), warning(lang('sure_remove_attachment')));
} else {
    ?>
<div class="pure-control-group">
<?php 
echo form_label(lang('interrupted_long'), 'interrupted');
echo form_radio_and_label('interrupted', '1', $interrupted, lang('yes'));
echo form_radio_and_label('interrupted', '0', $interrupted, lang('no'), TRUE);
?>
</div>
<div class="pure-control-group">
<?php 
echo form_label(lang('excluded_long'), 'excluded');
echo form_radio_and_label('excluded', '1', $excluded, lang('yes'));
echo form_radio_and_label('excluded', '0', $excluded, lang('no'), TRUE);
?>
</div>
<?php 
echo form_dropdown_and_label('excluded_reason', array(ExcludedReason::Crying => 'Huilen', ExcludedReason::FussyOrRestless => 'Onrustig gedrag', ExcludedReason::ParentalInterference => 'Inmenging ouder', ExcludedReason::TechnicalProblems => 'Technische problemen', ExcludedReason::Interrupted => lang('interrupted_long'), ExcludedReason::Other => 'Anders'), $excluded_reason);
?>

<?php 
echo form_fieldset(lang('comments'));
?>
<p class="warning"><?php 
echo lang('part_comment_info');
?>
</p>
<?php 
echo form_textarea_and_label('comment', $comment, lang('part_comment'), 'required');
?>
<p class="warning"><?php 
echo lang('pp_comment_info');
?>
            echo ' <a class="add_l">+ voeg taal toe</a>';
        } else {
            echo ' <a class="del_l">x verwijder taal</a>';
        }
        echo '</div>';
        $i++;
    }
    ?>
	<?php 
}
?>
</div>

	<?php 
echo form_fieldset(lang('data_end'));
?>
	<?php 
echo form_dropdown_and_label('origin', array('letter' => lang('origin_letter'), 'zwazat' => lang('origin_zwazat'), 'mouth' => lang('origin_mouth'), 'info' => lang('origin_info'), 'other' => lang('origin_other')), $origin);
?>
	<?php 
echo form_textarea_and_label('comment', $comment, lang('comment_space'));
?>

	<?php 
echo form_controls();
?>
	<?php 
echo form_fieldset_close();
?>
	<?php 
echo form_close();
							</p>
						<?php 
}
?>
						<p>
						<?php 
echo form_label(lang('appointment'));
?>
						<?php 
echo form_input('appointment', '', 'placeholder= "' . lang('appointment') . '" class="appointment required"');
?>
                        <?php 
echo form_error('appointment');
?>
						<?php 
echo form_dropdown_and_label('leader', $leaders, array(), '', FALSE, NULL);
?>
                        </p>
                        <div id="alertboxChosenTime" class="warning" style="text-align: left; display: none; padding-left: 40px;">
                        	
                        </div>
                        <p>
						<?php 
echo form_submit_only();
?>
						</p>
						<?php 
echo form_close();
?>
					</div>
				</li>
<?php 
echo heading(lang('testsurveys'), 2);
?>

<?php 
echo $this->session->flashdata('message');
?>

<?php 
echo form_open($action, array('class' => 'pure-form pure-form-aligned'));
echo form_fieldset($page_title);
?>

<?php 
if ($new_testsurvey) {
    echo form_dropdown_and_label('test', test_options($tests), $test_id);
} else {
    echo form_input_and_label('test', $test->name, 'readonly');
}
echo form_input_and_label('limesurvey_id', $limesurvey_id, 'required class="positive-integer"');
?>
<div class="pure-control-group">
<?php 
echo form_label(lang('whensent'), 'whensent');
echo form_radio_and_label('whensent', TestWhenSent::Participation, $whensent, lcfirst(lang(TestWhenSent::Participation)));
echo form_radio_and_label('whensent', TestWhenSent::Months, $whensent, lang(TestWhenSent::Months));
echo form_radio_and_label('whensent', TestWhenSent::Manual, $whensent, lang(TestWhenSent::Manual));
?>
</div>
<?php 
echo form_input_and_label('whennr', $whennr, 'required class="positive-integer"');
示例#11
0
 /** Filters the testsurveys by test on the add (single) page. */
 public function filter_testsurveys()
 {
     $test_id = $this->input->post('test_id');
     $testsurveys = $this->testSurveyModel->get_testsurveys_by_test($test_id);
     echo form_dropdown_and_label('testsurvey', testsurvey_options($testsurveys));
 }