diff options
author | Sashi20 | 2020-03-03 10:36:33 +0530 |
---|---|---|
committer | GitHub | 2020-03-03 10:36:33 +0530 |
commit | a6004bccf824587cc4c778c7c2341efb9336b777 (patch) | |
tree | 36ab157d247f63962136bff5c1909813fff14d4d /manage_proposal.inc | |
parent | 2f359a69d56052cdd4adaf95edf38d89e4915245 (diff) | |
parent | d4b0c5b5d5896f5b8a5ca1725f52eaffb5c9f351 (diff) | |
download | cfd_case_study-a6004bccf824587cc4c778c7c2341efb9336b777.tar.gz cfd_case_study-a6004bccf824587cc4c778c7c2341efb9336b777.tar.bz2 cfd_case_study-a6004bccf824587cc4c778c7c2341efb9336b777.zip |
Merge pull request #11 from Sashi20/master
Add fields to collect faculty data in proposal form
Diffstat (limited to 'manage_proposal.inc')
-rwxr-xr-x | manage_proposal.inc | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index 5f1a7a5..1d74562 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -149,6 +149,24 @@ function cfd_case_study_proposal_approval_form($form, &$form_state) drupal_goto('case-study-project/manage-proposal'); return; } + if($proposal_data->faculty_name == ''){ + $faculty_name = 'NA'; + } + else{ + $faculty_name = $proposal_data->faculty_name; + } + if($proposal_data->faculty_department == ''){ + $faculty_department = 'NA'; + } + else{ + $faculty_department = $proposal_data->faculty_department; + } + if($proposal_data->faculty_email == ''){ + $faculty_email = 'NA'; + } + else{ + $faculty_email = $proposal_data->faculty_email; + } $form['contributor_name'] = array( '#type' => 'item', '#markup' => l($proposal_data->name_title . ' ' . $proposal_data->contributor_name, 'user/' . $proposal_data->uid), @@ -170,6 +188,26 @@ function cfd_case_study_proposal_approval_form($form, &$form_state) '#markup' => $proposal_data->university, '#title' => t('University/Institute') ); + $form['how_did_you_know_about_project'] = array( + '#type' => 'item', + '#markup' => $proposal_data->how_did_you_know_about_project, + '#title' => t('How did you know about the project') + ); + $form['faculty_name'] = array( + '#type' => 'item', + '#markup' => $faculty_name, + '#title' => t('Name of the faculty') + ); + $form['faculty_department'] = array( + '#type' => 'item', + '#markup' => $faculty_department, + '#title' => t('Department of the faculty') + ); + $form['faculty_email'] = array( + '#type' => 'item', + '#markup' => $faculty_email, + '#title' => t('Email of the faculty') + ); $form['country'] = array( '#type' => 'item', '#markup' => $proposal_data->country, @@ -406,6 +444,24 @@ function cfd_case_study_proposal_status_form($form, &$form_state) drupal_goto('case-study-project/manage-proposal'); return; } + if($proposal_data->faculty_name == ''){ + $faculty_name = 'NA'; + } + else{ + $faculty_name = $proposal_data->faculty_name; + } + if($proposal_data->faculty_department == ''){ + $faculty_department = 'NA'; + } + else{ + $faculty_department = $proposal_data->faculty_department; + } + if($proposal_data->faculty_email == ''){ + $faculty_email = 'NA'; + } + else{ + $faculty_email = $proposal_data->faculty_email; + } $form['contributor_name'] = array( '#type' => 'item', '#markup' => l($proposal_data->name_title . ' ' . $proposal_data->contributor_name, 'user/' . $proposal_data->uid), @@ -422,6 +478,26 @@ function cfd_case_study_proposal_status_form($form, &$form_state) '#markup' => $proposal_data->university, '#title' => t('University/Institute') ); + $form['how_did_you_know_about_project'] = array( + '#type' => 'item', + '#markup' => $proposal_data->how_did_you_know_about_project, + '#title' => t('How did you know about the project') + ); + $form['faculty_name'] = array( + '#type' => 'item', + '#markup' => $faculty_name, + '#title' => t('Name of the faculty') + ); + $form['faculty_department'] = array( + '#type' => 'item', + '#markup' => $faculty_department, + '#title' => t('Department of the faculty') + ); + $form['faculty_email'] = array( + '#type' => 'item', + '#markup' => $faculty_email, + '#title' => t('Email of the faculty') + ); $form['country'] = array( '#type' => 'item', '#markup' => $proposal_data->country, @@ -682,6 +758,36 @@ function cfd_case_study_proposal_edit_form($form, &$form_state) '#required' => TRUE, '#default_value' => $proposal_data->institute ); + $form['how_did_you_know_about_project'] = array( + '#type' => 'textfield', + '#title' => t('How did you come to know about the Case Study Project?'), + '#default_value' => $proposal_data->how_did_you_know_about_project, + '#required' => TRUE + ); + $form['faculty_name'] = array( + '#type' => 'textfield', + '#title' => t('Name of the Faculty'), + '#size' => 50, + '#maxlength' => 50, + '#validated' => TRUE, + '#default_value' => $proposal_data->faculty_name + ); + $form['faculty_department'] = array( + '#type' => 'textfield', + '#title' => t('Department of the Faculty'), + '#size' => 50, + '#maxlength' => 50, + '#validated' => TRUE, + '#default_value' => $proposal_data->faculty_department + ); + $form['faculty_email'] = array( + '#type' => 'textfield', + '#title' => t('Email id of the Faculty'), + '#size' => 255, + '#maxlength' => 255, + '#validated' => TRUE, + '#default_value' => $proposal_data->faculty_email + ); $form['country'] = array( '#type' => 'select', '#title' => t('Country'), @@ -896,6 +1002,10 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state) contributor_name=:contributor_name, university=:university, institute=:institute, + how_did_you_know_about_project = :how_did_you_know_about_project, + faculty_name = :faculty_name, + faculty_department = :faculty_department, + faculty_email = :faculty_email, city=:city, pincode=:pincode, state=:state, @@ -908,6 +1018,10 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state) ':contributor_name' => $v['contributor_name'], ':university' => $v['university'], ":institute" => $v['institute'], + ":how_did_you_know_about_project" => $v['how_did_you_know_about_project'], + ":faculty_name" => $v['faculty_name'], + ":faculty_department" => $v['faculty_department'], + ":faculty_email" => $v['faculty_email'], ':city' => $v['city'], ':pincode' => $v['pincode'], ':state' => $v['all_state'], |