Skip to content
Snippets Groups Projects
Commit 00a6e8cd authored by aly2191's avatar aly2191
Browse files

moved school field

parent 5064d614
No related branches found
No related tags found
No related merge requests found
......@@ -34,10 +34,6 @@ class CRM_Nbrgeneralobservation_Form_NbrGenObservations extends CRM_Core_Form {
public function buildQuickForm() {
$this->add('hidden', 'entity_id');
$this->add('select', 'nvgo_school_id', E::ts('School list'),
CRM_Nbrschools_BAO_NbrSchool::getNbrSchoolValues(), FALSE,
['class' => 'crm-select2', 'placeholder' => ' - select school']);
$this->add('select', 'nvgo_ethnicity_id', E::ts('Ethnicity'),
CRM_Nihrbackbone_Utils::getOptionValueList('nihr_ethnicity'), FALSE,
['class' => 'crm-select2', 'placeholder' => ' - select ethnicity',]);
......@@ -81,6 +77,12 @@ class CRM_Nbrgeneralobservation_Form_NbrGenObservations extends CRM_Core_Form {
'Proband', // field label(),
[1 => 'proband']
);
$this->add('select', 'nvgo_school_id', E::ts('School list'),
CRM_Nbrschools_BAO_NbrSchool::getNbrSchoolValues(), FALSE,
['class' => 'crm-select2', 'placeholder' => ' - select school']);
$this->addButtons([
[
'type' => 'submit',
......
......@@ -58,7 +58,6 @@ class CRM_Nbrgeneralobservation_Page_NbrGenObservations extends CRM_Core_Page {
// Convert to readable format, might not even need to change most
private function assembleObsRow(array $observations): array {
$observations['nvgo_school_id'] = CRM_Nbrgeneralobservation_BAO_NbrGenObservations::getSchoolLabel($observations['nvgo_school_id']);
$observations['nvgo_hand_preference'] = CRM_Nihrbackbone_Utils::getOptionValueLabel($observations['nvgo_hand_preference'], 'nbr_hand_preference');
$observations['nvgo_ethnicity_id'] = CRM_Nihrbackbone_Utils::getOptionValueLabel($observations['nvgo_ethnicity_id'], 'nihr_ethnicity');
......@@ -67,7 +66,8 @@ class CRM_Nbrgeneralobservation_Page_NbrGenObservations extends CRM_Core_Page {
$observations['nvgo_probably_consanguineous'] = $this->yesOrNo($observations['nvgo_probably_consanguineous']);
$observations['nvgo_proband'] = ($observations['nvgo_proband']) ? "Proband" : NULL;
$observations['nvgo_family_history'] = $this->yesOrNo($observations['nvgo_family_history']);
$observations['show_on_portal__1015'] = $this->yesOrNo($observations['show_on_portal_1015']);
$observations['nvgo_school_id'] = CRM_Nbrgeneralobservation_BAO_NbrGenObservations::getSchoolLabel($observations['nvgo_school_id']);
$observations['nvgo_bmi'] = round($observations['nvgo_bmi'], 2);
return ($observations);
}
......
......@@ -12,10 +12,6 @@
<table class="crm-info-panel">
<tbody>
<tr>
<td class="label">School value</td>
<td class="html-adjust">{$observations.nvgo_school_id}</td>
</tr>
<tr>
<td class="label">Ethnicity</td>
<td class="html-adjust">{$observations.nvgo_ethnicity_id}</td>
......@@ -56,6 +52,10 @@
<td class="label"> Family history (close family members with same or similar conditions)</td>
<td class="html-adjust">{$observations.nvgo_family_history}</td>
</tr>
<tr>
<td class="label">School value</td>
<td class="html-adjust">{$observations.nvgo_school_id}</td>
</tr>
</tbody>
</table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment