update form to ask previous sw question

This commit is contained in:
Nathan Coad
2019-09-10 09:49:26 +10:00
parent 5d848794b9
commit 47fcbd04f2
3 changed files with 27 additions and 2 deletions

View File

@@ -412,7 +412,8 @@ function booking_update($node) {
'booking_welfare_required', 'booking_payment_complete', 'booking_refund_processed', 'booking_committee_member'
);
//these fields should be zero if not defined
$default_zero_keys = array('booking_luckynum', 'booking_bf_gf_nid', 'booking_keepseparate_id', 'booking_refund_due', 'booking_earlyaccess_code_id');
$default_zero_keys = array('booking_luckynum', 'booking_bf_gf_nid', 'booking_keepseparate_id', 'booking_refund_due', 'booking_earlyaccess_code_id',
'booking_prev_sw_count');
//some fields are present in $node from the SQL view we use that don't belong in booking_person so exclude them
$excluded_keys = array('booking_person_nid', 'booking_transport_type', 'booking_transport_from_morriset_reqd', 'booking_transport_to_morriset_reqd',
@@ -893,6 +894,9 @@ function booking_view($node, $view_mode) {
if (variable_get('booking_enable_freestyle', 0) == 1) {
$rows[] = array(t('Freestyle:'), t('!song', array('!song' => $node->booking_freestyle_text)));
}
if (variable_get('booking_enable_previous_studyweeks', 0) == 1) {
$rows[] = array(t('Number of previous SW:'), t('!sw', array('!sw' => $node->booking_prev_sw_count)));
}
if (variable_get('booking_enable_tshirts', 0) == 1) {
$rows[] = array(t('Hoodie Size:'), t('!size', array('!size' => $node->booking_shirt_size)));
}