diff options
author | Sashi20 | 2024-03-28 11:43:58 +0530 |
---|---|---|
committer | GitHub | 2024-03-28 11:43:58 +0530 |
commit | 1620be9664728156ff79a81b5bbe251222427a38 (patch) | |
tree | 4b28d2524dfa913dfbe1ca08edad52f014dbb0a4 | |
parent | 34fd7eec05e703def43e0e5c9331afec5e4c0963 (diff) | |
parent | bcbf6213885daecc335e75d3b9f76a68d5b16136 (diff) | |
download | r_case_study-1620be9664728156ff79a81b5bbe251222427a38.tar.gz r_case_study-1620be9664728156ff79a81b5bbe251222427a38.tar.bz2 r_case_study-1620be9664728156ff79a81b5bbe251222427a38.zip |
Merge pull request #11 from Sashi20/master
Update field titles in the proposal form
-rwxr-xr-x | manage_proposal.inc | 10 | ||||
-rwxr-xr-x | proposal.inc | 58 |
2 files changed, 31 insertions, 37 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index 4c90af0..7b83ef2 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -309,7 +309,7 @@ function r_case_study_proposal_approval_form($form, &$form_state) $form['description'] = array( '#type' => 'item', '#markup' => $proposal_data->description, - '#title' => t('Objective') + '#title' => t('Objective and Necessity of the Case Study') ); $form['literature_survey_file'] = array( '#type' => 'item', @@ -318,7 +318,7 @@ function r_case_study_proposal_approval_form($form, &$form_state) ); $form['abstract_file'] = array( '#type' => 'item', - '#markup' => l('View abstract', 'case-study-project/download/proposal-abstract-files/' . $proposal_data->id), + '#markup' => l('View Methodology details', 'case-study-project/download/proposal-abstract-files/' . $proposal_data->id), '#title' => t('Abstract File') ); $form['rawdata_file'] = array( @@ -599,7 +599,7 @@ function r_case_study_proposal_status_form($form, &$form_state) $form['description'] = array( '#type' => 'item', '#markup' => $proposal_data->description, - '#title' => t('Objective') + '#title' => t('Objective and Necessity of the Case Study') ); /*$url = '~(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i'; $reference = preg_replace($url, '<a href="$0" target="_blank" title="$0">$0</a>', $re);*/ @@ -991,13 +991,13 @@ function r_case_study_proposal_edit_form($form, &$form_state) '#type' => 'textfield', '#title' => t('Title of the Case Study Project'), '#size' => 300, - '#maxlength' => 500, + '#maxlength' => 100, '#required' => true, '#default_value' => $proposal_data->project_title, ); $form['description'] = array( '#type' => 'textarea', - '#title' => t('Objective'), + '#title' => t('Objective and Necessity of the Case Study'), '#size' => 300, '#maxlength' => 1200, '#required' => true, diff --git a/proposal.inc b/proposal.inc index ec8b384..1d21d91 100755 --- a/proposal.inc +++ b/proposal.inc @@ -298,22 +298,38 @@ function r_case_study_proposal_form($form, &$form_state, $no_js_use = FALSE) '#type' => 'textarea', '#title' => t('Case Study Title'), '#size' => 250, - '#maxlength' => 500, - '#description' => t('Maximum character limit is 500'), + '#maxlength' => 100, + '#description' => t('Maximum character limit is 100'), '#required' => TRUE, ); $form['description'] = array( '#type' => 'textarea', - '#title' => t('Objective'), + '#title' => t('Objective and Necessity of the Case Study'), '#size' => 250, '#maxlength' => 1200, '#description' => t('Maximum character limit is 1200'), '#required' => TRUE, ); + $form['raw_data_title'] = array( + '#type' => 'item', + '#title' => t('<h5>Data Submission</h5>'), + '#markup' => t('Upload a zip file containing raw data (in .csv)/Data Description File (in .pdf)/ Data Source Link (in .txt)') + ); + $form['raw_data_file'] = array( + '#type' => 'fieldset', + '#title' => t('Upload data directory submission <span style="color:red">*</span>'), + '#collapsible' => FALSE, + '#collapsed' => FALSE + ); + $form['raw_data_file']['raw_data_file_path'] = array( + '#type' => 'file', + '#size' => 48, + '#description' => t('<span style="color:red;">Upload filenames with allowed extensions only. No spaces or any special characters allowed in filename.</span>') . '<br />' . t('<span style="color:red;">Allowed file extensions: ') . variable_get('proposal_raw_data_upload_extensions', '') . '</span>' + ); $form['sample_references_file'] = array( '#type' => 'item', - '#title' => t('<h5>Literature Survey File Submission</h5>'), - '#markup' => t('Please download the template of the Literature Survey using the following link: ') . t('<a href= "https://static.fossee.in/r/Sample_R_Codes/Literature%20Survey.docx" target="_blank">Click Here</a>') . '<br>' . t('Kindly fill it and submit it in the section below. Make sure to add at least 10 items in the survey list.') + '#title' => t('<h5>Literature Survey Submission</h5>'), + '#markup' => t('Please download the template of the Literature Survey using the following link: ') . t('<a href= "https://static.fossee.in/r/Sample_R_Codes/Literature%20Survey.docx" target="_blank">Click Here</a>') . '<br>' . t('Kindly fill it and submit it in the section below.') ); $form['literature_survey_file'] = array( @@ -327,22 +343,14 @@ function r_case_study_proposal_form($form, &$form_state, $no_js_use = FALSE) '#size' => 48, '#description' => t('<span style="color:red;">Upload filenames with allowed extensions only. No spaces or any special characters allowed in filename.</span>') . '<br />' . t('<span style="color:red;">Allowed file extensions: ') . variable_get('proposal_literature_survey_upload_extensions', '') . '</span>' ); - // $form['references'] = array( - // '#type' => 'textfield', - // '#title' => t("Literature Survey"), - // '#size' => 255, - // '#maxlength' => 2500, - // '#description' => t('Maximum character limit is 2500'), - // '#required' => TRUE - // ); $form['sample_abstract_file'] = array( '#type' => 'item', - '#title' => t('<h5>Abstract File Submission</h5>'), - '#markup' => t('Kindly refer to the following link to know the ideal abstract file format:') . t('<a href= "https://r.fossee.in/case-study-project/download/proposal-abstract-files/4" target="_blank"> Click Here</a>') + '#title' => t('<h5>Methodology Details</h5>'), + '#markup' => t('Kindly refer to Point no. 4 of the Proposal Documents in the <a href= "https://r.fossee.in/case-study-project/submission-guidelines" target="_blank">Submission Guidlines</a> to know the requirements of the document.') ); $form['abstract_file'] = array( '#type' => 'fieldset', - '#title' => t('Submit an Abstract<span style="color:red">*</span>'), + '#title' => t('Methodology Details<span style="color:red">*</span>'), '#collapsible' => FALSE, '#collapsed' => FALSE ); @@ -351,17 +359,7 @@ function r_case_study_proposal_form($form, &$form_state, $no_js_use = FALSE) '#size' => 48, '#description' => t('<span style="color:red;">Upload filenames with allowed extensions only. No spaces or any special characters allowed in filename.</span>') . '<br />' . t('<span style="color:red;">Allowed file extensions: ') . variable_get('proposal_abstract_upload_extensions', '') . '</span>' ); - $form['raw_data_file'] = array( - '#type' => 'fieldset', - '#title' => t('Submit raw data file/s<span style="color:red">*</span>'), - '#collapsible' => FALSE, - '#collapsed' => FALSE - ); - $form['raw_data_file']['raw_data_file_path'] = array( - '#type' => 'file', - '#size' => 48, - '#description' => t('<span style="color:red;">Upload filenames with allowed extensions only. No spaces or any special characters allowed in filename.</span>') . '<br />' . t('<span style="color:red;">Allowed file extensions: ') . variable_get('proposal_raw_data_upload_extensions', '') . '</span>' - ); + $form['date_of_proposal'] = array( '#type' => 'date_popup', '#title' => t('Date of Proposal'), @@ -457,11 +455,7 @@ function r_case_study_proposal_form_validate($form, &$form_state) $form_state['values']['case_study_title'] = trim($form_state['values']['case_study_title']); if ($form_state['values']['case_study_title'] != '') { - if (strlen($form_state['values']['case_study_title']) > 250) - { - form_set_error('case_study_title', t('Maximum charater limit is 250 charaters only, please check the length of the project title')); - } //strlen($form_state['values']['project_title']) > 250 - else if (strlen($form_state['values']['case_study_title']) < 10) + if (strlen($form_state['values']['case_study_title']) < 10) { form_set_error('case_study_title', t('Minimum charater limit is 10 charaters, please check the length of the project title')); } |