diff options
Diffstat (limited to 'manage_proposal.inc')
-rwxr-xr-x | manage_proposal.inc | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index 0733812..17aefe5 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -847,6 +847,7 @@ function dwsim_flowsheet_proposal_edit_form($form, &$form_state) '#maxlength' => 200, '#default_value' => $proposal_data->project_guide_university ); + if($proposal_data->country == 'India'){ $form['country'] = array( '#type' => 'select', '#title' => t('Country'), @@ -859,9 +860,38 @@ function dwsim_flowsheet_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( @@ -877,7 +907,7 @@ function dwsim_flowsheet_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') @@ -893,7 +923,7 @@ function dwsim_flowsheet_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') @@ -907,33 +937,7 @@ function dwsim_flowsheet_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'), |