From 53ce71ad7e2f0226c71993f28e2ebeab1a90d510 Mon Sep 17 00:00:00 2001 From: Saketh1499 Date: Mon, 3 Jan 2022 22:19:08 +0530 Subject: Updating project title and solvers sections in proposal form --- manage_proposal.inc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'manage_proposal.inc') diff --git a/manage_proposal.inc b/manage_proposal.inc index 937b4aa..3564c75 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -1001,7 +1001,6 @@ function cfd_case_study_proposal_edit_form($form, &$form_state) 'callback' => 'ajax_solver_used_callback', ), ); - $version_id = isset($form_state['values']['version']) ? $form_state['values']['version'] : $proposal_data->version_id; $simulation_id = isset($form_state['values']['simulation_type']) ? $form_state['values']['simulation_type'] : $proposal_data->simulation_type_id; $form['solver_used'] = array( @@ -1013,7 +1012,7 @@ function cfd_case_study_proposal_edit_form($form, &$form_state) '#states' => array( 'invisible' => array( ':input[name="simulation_type"]' => array( - 'value' => 13 + 'value' => 19 ) ) ), @@ -1032,7 +1031,7 @@ function cfd_case_study_proposal_edit_form($form, &$form_state) '#states' => array( 'visible' => array( ':input[name="simulation_type"]' => array( - 'value' => 13 + 'value' => 19 ) ) ), @@ -1068,9 +1067,8 @@ function cfd_case_study_proposal_edit_form($form, &$form_state) } function ajax_solver_used_callback($form, $form_state){ - $version_id = isset($form_state['values']['version']) ? $form_state['values']['version'] : key($version_options); $simulation_id = isset($form_state['values']['simulation_type']) ? $form_state['values']['simulation_type'] : key($simulation_type_options); - if($simulation_id < 13){ + if($simulation_id < 19){ $form['solver_used']['#options'] = _cs_list_of_solvers($version_id, $simulation_id); $form['solver_used']['#required'] = TRUE; $form['solver_used']['#validated'] = TRUE; @@ -1089,12 +1087,12 @@ function ajax_solver_used_callback($form, $form_state){ ); } function cfd_case_study_proposal_edit_form_validate($form, $form_state){ - if ($form_state['values']['simulation_type'] < 13) { + if ($form_state['values']['simulation_type'] < 19) { if($form_state['values']['solver_used'] == '0'){ form_set_error('solver_used', t('Please select an option')); } } - else if ($form_state['values']['simulation_type'] == 13) { + else if ($form_state['values']['simulation_type'] == 19) { if ($form_state['values']['solver_used_text'] != '') { if (strlen($form_state['values']['solver_used_text']) > 100) @@ -1182,7 +1180,7 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state) return; } $simulation_id = $v['simulation_type']; - if($simulation_id < 13){ + if($simulation_id < 19){ $solver = $v['solver_used']; } else{ -- cgit