<?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">
<?php 
echo heading(lang('percentiles'), 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_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));