store changes from studygroup definition form
This commit is contained in:
@@ -47,7 +47,9 @@ function booking_studygroups_view_summary() {
|
|||||||
|
|
||||||
global $event;
|
global $event;
|
||||||
$output = "";
|
$output = "";
|
||||||
$header = array('Study Group', 'Session Count', 'Reading Group?', 'View Membership', 'Compute Membership', 'Select Leaders', 'Download CSV');
|
$header = array('Study Group Day', 'Study Group Title', 'Study Group Explanation',
|
||||||
|
'Session Count', 'Reading Group?', 'View Membership', 'Compute Membership',
|
||||||
|
'Select Leaders', 'Download CSV');
|
||||||
//$attributes = array('style' => 'max-width:50%');
|
//$attributes = array('style' => 'max-width:50%');
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
$rows = array();
|
$rows = array();
|
||||||
@@ -60,7 +62,9 @@ function booking_studygroups_view_summary() {
|
|||||||
|
|
||||||
foreach ($result as $group) {
|
foreach ($result as $group) {
|
||||||
$rows[] = array(
|
$rows[] = array(
|
||||||
|
$group->booking_studygroup_weekday,
|
||||||
$group->booking_studygroup_descrip,
|
$group->booking_studygroup_descrip,
|
||||||
|
$group->booking_studygroup_explanation,
|
||||||
$group->booking_num_group_sessions,
|
$group->booking_num_group_sessions,
|
||||||
$group->booking_is_readinggroup == 'Y' ? 'Yes' : 'No',
|
$group->booking_is_readinggroup == 'Y' ? 'Yes' : 'No',
|
||||||
l(t('Current Membership', array('!id' => $group->sid)), t('admin/booking/studygroups/!id/view', array('!id' => $group->sid))),
|
l(t('Current Membership', array('!id' => $group->sid)), t('admin/booking/studygroups/!id/view', array('!id' => $group->sid))),
|
||||||
@@ -114,7 +118,8 @@ function booking_studygroups_define_form($node, &$form_state, $create, $editid =
|
|||||||
if(!isset($form_state['storage']['confirm'])) {
|
if(!isset($form_state['storage']['confirm'])) {
|
||||||
$form['booking_studygroup_weekday'] = array (
|
$form['booking_studygroup_weekday'] = array (
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('Day of the week this study group will be held (eg Monday)'),
|
'#title' => t('Day of the week this study group will be held'),
|
||||||
|
'#description' => t('For example, "Monday"'),
|
||||||
'#size' => 60,
|
'#size' => 60,
|
||||||
'#maxlength' => 150,
|
'#maxlength' => 150,
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
@@ -122,7 +127,8 @@ function booking_studygroups_define_form($node, &$form_state, $create, $editid =
|
|||||||
);
|
);
|
||||||
$form['booking_studygroup_descrip'] = array (
|
$form['booking_studygroup_descrip'] = array (
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('Description of this study group (eg Study Group 1)'),
|
'#title' => t('Description of this study group'),
|
||||||
|
'#description' => t('For example, "Study Group 1"'),
|
||||||
'#size' => 60,
|
'#size' => 60,
|
||||||
'#maxlength' => 150,
|
'#maxlength' => 150,
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
@@ -130,7 +136,8 @@ function booking_studygroups_define_form($node, &$form_state, $create, $editid =
|
|||||||
);
|
);
|
||||||
$form['booking_studygroup_explanation'] = array (
|
$form['booking_studygroup_explanation'] = array (
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('Explanation for this study group (eg Matthew chapter 1)'),
|
'#title' => t('Explanation for this study group'),
|
||||||
|
'#description' => t('For example, "This relates to section 1 of the notes, which covers Matthew chapter 1."'),
|
||||||
'#size' => 60,
|
'#size' => 60,
|
||||||
'#maxlength' => 150,
|
'#maxlength' => 150,
|
||||||
'#required' => TRUE,
|
'#required' => TRUE,
|
||||||
@@ -209,7 +216,9 @@ function booking_studygroups_define_form_submit($form, &$form_state) {
|
|||||||
db_insert('booking_studygroup_list')
|
db_insert('booking_studygroup_list')
|
||||||
->fields(array(
|
->fields(array(
|
||||||
'booking_eventid' => $event->eid,
|
'booking_eventid' => $event->eid,
|
||||||
|
'booking_studygroup_weekday' => $values['booking_studygroup_weekday'],
|
||||||
'booking_studygroup_descrip' => $values['booking_studygroup_descrip'],
|
'booking_studygroup_descrip' => $values['booking_studygroup_descrip'],
|
||||||
|
'booking_studygroup_explanation' => $values['booking_studygroup_explanation'],
|
||||||
'booking_num_group_sessions' => $values['booking_num_group_sessions'],
|
'booking_num_group_sessions' => $values['booking_num_group_sessions'],
|
||||||
'booking_is_readinggroup' => $values['booking_is_readinggroup'] == 1 ? 'Y' : 'N',
|
'booking_is_readinggroup' => $values['booking_is_readinggroup'] == 1 ? 'Y' : 'N',
|
||||||
))
|
))
|
||||||
@@ -250,7 +259,9 @@ function booking_studygroups_define_form_submit($form, &$form_state) {
|
|||||||
db_update('booking_studygroup_list')
|
db_update('booking_studygroup_list')
|
||||||
->fields(array (
|
->fields(array (
|
||||||
'booking_eventid' => $event->eid,
|
'booking_eventid' => $event->eid,
|
||||||
|
'booking_studygroup_weekday' => $values['booking_studygroup_weekday'],
|
||||||
'booking_studygroup_descrip' => $values['booking_studygroup_descrip'],
|
'booking_studygroup_descrip' => $values['booking_studygroup_descrip'],
|
||||||
|
'booking_studygroup_explanation' => $values['booking_studygroup_explanation'],
|
||||||
'booking_num_group_sessions' => $values['booking_num_group_sessions'],
|
'booking_num_group_sessions' => $values['booking_num_group_sessions'],
|
||||||
'booking_is_readinggroup' => $values['booking_is_readinggroup'] == 1 ? 'Y' : 'N',
|
'booking_is_readinggroup' => $values['booking_is_readinggroup'] == 1 ? 'Y' : 'N',
|
||||||
))
|
))
|
||||||
|
Reference in New Issue
Block a user