diff options
Diffstat (limited to 'testimonials_edit.inc')
-rw-r--r-- | testimonials_edit.inc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/testimonials_edit.inc b/testimonials_edit.inc index acfed1a..44731c9 100644 --- a/testimonials_edit.inc +++ b/testimonials_edit.inc @@ -218,14 +218,14 @@ function fellowship_testimonials_edit_form($form, $form_state, $testimonial_id = "#type" => "hidden", "#value" => $testimonial_id ); - $form["hide"]= array( + $form["hidden"]= array( "#type" => "radios", "#options" => array( "1" => "Yes", "0" => "No", ), - '#title' => t('Do you want to hide the testimonial from the list:'), - '#default_value' => $row->hide + '#title' => t('Do you want to hide the testimonial from the public:'), + '#default_value' => $row->hidden ); $form["submit"] = array( "#type" => "submit", @@ -282,7 +282,7 @@ function fellowship_testimonials_edit_form_submit($form, &$form_state) { 'year' => $v['fellowship_year'], 'fellowship_task' => $v['fellowship_task'], 'testimonial_video' => $v['testimonial_video'], - 'hide' => $v['hide']['value'] + 'hidden' => $v['hidden']['value'] )); } @@ -294,7 +294,7 @@ function fellowship_testimonials_edit_form_submit($form, &$form_state) { 'fellowship_task' => $v['fellowship_task'], 'testimonial_text' => $v['testimonial_text']['value'], 'testimonial_text_format' => $v['testimonial_text']['format'], - 'hide' => $v['hide']['value'] + 'hidden' => $v['hidden']['value'] )); } $query->condition('id', $v['testimonial_id']); @@ -345,7 +345,7 @@ function fellowship_testimonials_edit_all($testimonial_id=0) { $result = $query->execute(); $headers = array( - "Name", "Institute", "Activity Name", "Type", "Action" + "Name", "Institute", "Activity Name", "Type", "Action", "Status" ); $rows = array(); @@ -360,6 +360,12 @@ function fellowship_testimonials_edit_all($testimonial_id=0) { else{ $testimonial_type = "Video"; } + if($row->hidden == 1){ + $display_status = "Hidden to public"; + } + else{ + $display_status = "Displayed to public"; + } /*$speakerquery = db_select('fellows'); $speakerquery->fields('fellows'); $speakerquery->condition('t_id', $row->id); @@ -374,8 +380,9 @@ function fellowship_testimonials_edit_all($testimonial_id=0) { $institute, $row -> activity, $testimonial_type, - l("Edit", "internship-experiences/edit/{$row->id}") + l("Edit", "internship-experiences/edit/{$row->id}"), // l("Delete", "fellowship-testimonials/delete/{$row->id}") + $display_status ); array_push($rows, $item); |