diff options
author | Sashi20 | 2019-01-02 11:35:49 +0530 |
---|---|---|
committer | GitHub | 2019-01-02 11:35:49 +0530 |
commit | 87245eabf40f9ab78597e154415a1183eabdc84a (patch) | |
tree | 4a0cf136307d7fdbe4e46b0a8c16ef61990032e0 /manage_proposal.inc | |
parent | 12a6ef432d7d1d30ae8e129fd39902287e77ad68 (diff) | |
parent | c3f0071e8267ea15768d61bce2753c8e443fd854 (diff) | |
download | om_pssp-87245eabf40f9ab78597e154415a1183eabdc84a.tar.gz om_pssp-87245eabf40f9ab78597e154415a1183eabdc84a.tar.bz2 om_pssp-87245eabf40f9ab78597e154415a1183eabdc84a.zip |
Merge pull request #4 from Sashi20/master
Minor changes to proposal form and manage proposal
Diffstat (limited to 'manage_proposal.inc')
-rwxr-xr-x | manage_proposal.inc | 67 |
1 files changed, 36 insertions, 31 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index 3f7e3fd..0a421f2 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -708,7 +708,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) '#datepicker_options' => array( 'maxDate' => 0 ), - '#required' => TRUE + '#required' => FALSE ); $form['university'] = array( '#type' => 'textfield', @@ -718,6 +718,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) '#required' => TRUE, '#default_value' => $proposal_data->university ); + if($proposal_data->country == 'India'){ $form['country'] = array( '#type' => 'select', '#title' => t('Country'), @@ -730,9 +731,38 @@ function om_pssp_proposal_edit_form($form, &$form_state) '#tree' => TRUE, '#validated' => TRUE ); + $form['all_state'] = array( + '#type' => 'select', + '#title' => t('State'), + '#options' => _df_list_of_states(), + '#default_value' => $proposal_data->state, + '#validated' => TRUE, + '#states' => array( + 'visible' => array( + ':input[name="country"]' => array( + 'value' => 'India' + ) + ) + ) + ); + $form['city'] = array( + '#type' => 'select', + '#title' => t('City'), + '#options' => _df_list_of_cities(), + '#default_value' => $proposal_data->city, + '#states' => array( + 'visible' => array( + ':input[name="country"]' => array( + 'value' => 'India' + ) + ) + ) + ); +} +else{ $form['other_country'] = array( '#type' => 'textfield', - '#title' => t('Other than India'), + '#title' => t('Country(Other than India)'), '#size' => 100, '#default_value' => $proposal_data->country, '#attributes' => array( @@ -748,7 +778,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) ); $form['other_state'] = array( '#type' => 'textfield', - '#title' => t('State other than India'), + '#title' => t('State(Other than India)'), '#size' => 100, '#attributes' => array( 'placeholder' => t('Enter your state/region name') @@ -764,7 +794,7 @@ function om_pssp_proposal_edit_form($form, &$form_state) ); $form['other_city'] = array( '#type' => 'textfield', - '#title' => t('City other than India'), + '#title' => t('City(Other than India)'), '#size' => 100, '#attributes' => array( 'placeholder' => t('Enter your city name') @@ -778,33 +808,8 @@ function om_pssp_proposal_edit_form($form, &$form_state) ) ) ); - $form['all_state'] = array( - '#type' => 'select', - '#title' => t('State'), - '#options' => _df_list_of_states(), - '#default_value' => $proposal_data->state, - '#validated' => TRUE, - '#states' => array( - 'visible' => array( - ':input[name="country"]' => array( - 'value' => 'India' - ) - ) - ) - ); - $form['city'] = array( - '#type' => 'select', - '#title' => t('City'), - '#options' => _df_list_of_cities(), - '#default_value' => $proposal_data->city, - '#states' => array( - 'visible' => array( - ':input[name="country"]' => array( - 'value' => 'India' - ) - ) - ) - ); +} + $form['pincode'] = array( '#type' => 'textfield', '#title' => t('Pincode'), |