Added random fact fields
This commit is contained in:
@@ -183,6 +183,8 @@ function booking_admin() {
|
||||
'#options' => array (0 => t('No'), t('Yes')),
|
||||
'#default_value' => variable_get('booking_enable_studygroups', 0),
|
||||
);
|
||||
/*
|
||||
//deprecated now, this information is set in the db table
|
||||
$form['features']['booking_readinggroup_id'] = array (
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Studygroup ID for the reading group'),
|
||||
@@ -193,6 +195,7 @@ function booking_admin() {
|
||||
'#maxlength' => 3,
|
||||
'#default_value' => variable_get('booking_readinggroup_id','0'),
|
||||
);
|
||||
*/
|
||||
$form['features']['booking_enable_variety_sessions'] = array (
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Enable variety session form?'),
|
||||
|
@@ -499,6 +499,14 @@ function booking_update_7228() {
|
||||
db_change_field('booking_person', 'booking_medical_conditions', 'booking_medical_conditions', $spec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add field for random facts
|
||||
*/
|
||||
function booking_update_7229() {
|
||||
$spec = array('type' => 'varchar', 'length' => '1000', 'not null' => FALSE);
|
||||
db_add_field('booking_person', 'booking_random_facts', $spec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of hook_install().
|
||||
*/
|
||||
|
@@ -75,12 +75,12 @@ function booking_form($node, &$form_state, $inserting = FALSE) {
|
||||
//watchdog('booking', 'Booking registration form loading data from form submission: @info', array('@info' => var_export($form_state, TRUE)));
|
||||
}
|
||||
|
||||
/*
|
||||
$emergency_contact_type_options = array(
|
||||
'parent' => 'Parent',
|
||||
'legal_guardian' => 'Legal Guardian',
|
||||
'relative' => 'Close Relative');
|
||||
|
||||
/*
|
||||
$status_options[0] = t('Not Paid');
|
||||
$status_options[1] = t('Booked In');
|
||||
$status_options[2] = t('Waiting List');
|
||||
@@ -990,13 +990,21 @@ if (variable_get('booking_enable_passport', 0) == 1)
|
||||
{
|
||||
$form['misc-areas']['booking_room_mate1'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('I would like to share a room with'),
|
||||
'#title' => t('List up to two people you would like to share a room with (subject to availability).'),
|
||||
'#maxlength' => 200,
|
||||
'#required' => FALSE,
|
||||
'#default_value' => !empty($data->booking_room_mate1) ? $data->booking_room_mate1 : '',
|
||||
);
|
||||
}
|
||||
|
||||
$form['misc-areas']['booking_random_facts'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('List three random facts about yourself (optional).'),
|
||||
'#maxlength' => 200,
|
||||
'#required' => FALSE,
|
||||
'#default_value' => !empty($data->booking_random_facts) ? $data->booking_random_facts : '',
|
||||
);
|
||||
|
||||
|
||||
if ($inserting == TRUE) {
|
||||
$form['submit'] = array(
|
||||
|
@@ -235,6 +235,7 @@ function booking_insert($node) {
|
||||
'booking_refund_due' => $node->booking_refund_due,
|
||||
'booking_refund_processed' => $node->booking_refund_processed,
|
||||
'booking_committee_member' => $node->booking_committee_member,
|
||||
'booking_random_facts' => $node->booking_random_facts,
|
||||
))
|
||||
->execute();
|
||||
}
|
||||
@@ -300,6 +301,7 @@ function booking_update($node) {
|
||||
'booking_bf_gf_nid' => $node->booking_bf_gf_nid == '' ? 0 : $node->booking_bf_gf_nid,
|
||||
'booking_room_mate1' => $node->booking_room_mate1,
|
||||
'booking_room_mate2' => $node->booking_room_mate2,
|
||||
'booking_random_facts' => $node->booking_random_facts,
|
||||
'booking_shirt_size' => $node->booking_shirt_size,
|
||||
'booking_help_music' => $node->booking_help_music,
|
||||
'booking_help_praying' => ($node->booking_help_praying == 1 ? 'Y' : 'N'),
|
||||
@@ -691,6 +693,7 @@ function booking_view($node, $view_mode) {
|
||||
$rows[] = array(t('Refund Due:'), t('!amount_due', array('!amount_due' => $node->booking_refund_due)));
|
||||
$rows[] = array(t('Refund Processed:'), t('!ans', array('!ans' => ($node->booking_refund_processed == 'Y' ? 'Yes' : 'No'))));
|
||||
$rows[] = array(t('Reading Group:'), t('!group', array('!group' => $node->booking_readinggroup)));
|
||||
$rows[] = array(t('Random Facts:'), t('!facts', array('!facts' => $node->booking_random_facts)));
|
||||
|
||||
if (variable_get('booking_enable_tshirts', 0) == 1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user