summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]README.md0
-rwxr-xr-xlab_details.inc2
-rwxr-xr-xproposal.inc12
-rwxr-xr-xsolution_proposal.inc69
4 files changed, 72 insertions, 11 deletions
diff --git a/README.md b/README.md
index 3f9f26a..3f9f26a 100644..100755
--- a/README.md
+++ b/README.md
diff --git a/lab_details.inc b/lab_details.inc
index aef0ee4..baf30a3 100755
--- a/lab_details.inc
+++ b/lab_details.inc
@@ -6,7 +6,7 @@ function lab_migration_completed_labs_all()
$query = db_select('lab_migration_proposal');
$query->fields('lab_migration_proposal');
$query->condition('approval_status', 3);
- $query->orderBy('approval_date',DESC);
+ $query->orderBy('approval_date', DESC);
$result = $query->execute();
//$result = db_query($query);
if ($result->rowCount() == 0)
diff --git a/proposal.inc b/proposal.inc
index a473d2e..e580467 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -526,7 +526,7 @@ function lab_migration_proposal_form_submit($form, &$form_state)
drupal_set_message(t('We have received you Lab migration proposal. We will get back to you soon.'), 'status');
drupal_goto('');
}
-function _lm_list_of_states()
+/*function _lm_list_of_states()
{
$states = array(0 => '-Select-');
$query = db_select('list_states_of_india');
@@ -538,8 +538,8 @@ function _lm_list_of_states()
$states[$states_list_data->state] = $states_list_data->state;
}
return $states;
- }
-function _lm_list_of_cities()
+ }*/
+/*function _lm_list_of_cities()
{
$city = array(0 => '-Select-');
$query = db_select('list_cities_of_india');
@@ -564,8 +564,8 @@ function _lm_list_of_departments()
$department[$department_list_data->department] = $department_list_data->department;
}
return $department;
- }
-function _lm_list_of_software_version()
+ }*/
+/*function _lm_list_of_software_version()
{
$software_version = array();
$query = db_select('openfoam_software_version');
@@ -577,7 +577,7 @@ function _lm_list_of_software_version()
$software_version[$software_version_list_data->openfoam_version] = $software_version_list_data->openfoam_version;
}
return $software_version;
- }
+ }*/
function _lm_dir_name($lab, $name, $university)
{
$lab_title = ucname($lab);
diff --git a/solution_proposal.inc b/solution_proposal.inc
index 83841c5..b854771 100755
--- a/solution_proposal.inc
+++ b/solution_proposal.inc
@@ -115,7 +115,7 @@ function lab_migration_solution_proposal_form($form, $form_state)
$form['solution_provider_department'] = array(
'#type' => 'select',
'#title' => t('Department/Branch'),
- '#options' => _list_of_departments(),
+ '#options' => lm_list_of_departments(),
'#required' => TRUE
);
$form['solution_provider_university'] = array(
@@ -184,7 +184,7 @@ function lab_migration_solution_proposal_form($form, $form_state)
$form['all_state'] = array(
'#type' => 'select',
'#title' => t('State'),
- '#options' => _lm_list_of_states(),
+ '#options' => lm_list_of_states(),
'#validated' => TRUE,
'#states' => array(
'visible' => array(
@@ -197,7 +197,8 @@ function lab_migration_solution_proposal_form($form, $form_state)
$form['city'] = array(
'#type' => 'select',
'#title' => t('City'),
- '#options' => _lm_list_of_cities(),
+ '#options' => lm_list_of_cities(),
+ '#validated' => TRUE,
'#states' => array(
'visible' => array(
':input[name="country"]' => array(
@@ -219,7 +220,7 @@ function lab_migration_solution_proposal_form($form, $form_state)
$form['version'] = array(
'#type' => 'select',
'#title' => t('Version'),
- '#options' => _list_of_software_version(),
+ '#options' => lm_list_of_software_version(),
'#required' => TRUE
);
$form['older'] = array(
@@ -389,3 +390,63 @@ function lab_migration_solution_proposal_form_submit($form, &$form_state)
drupal_set_message('Error sending email message.', 'error');*/
drupal_goto('lab-migration/open-proposal');
}
+
+
+function lm_list_of_departments()
+ {
+ $department = array(
+ 0 => '-Select-'
+ );
+ $query = db_select('list_of_departments');
+ $query->fields('list_of_departments');
+ $query->orderBy('id', 'DESC');
+ $department_list = $query->execute();
+ while ($department_list_data = $department_list->fetchObject())
+ {
+ $department[$department_list_data->department] = $department_list_data->department;
+ }
+ return $department;
+ }
+function lm_list_of_states()
+ {
+ $states = array(
+ 0 => '-Select-'
+ );
+ $query = db_select('list_states_of_india');
+ $query->fields('list_states_of_india');
+ //$query->orderBy('', '');
+ $states_list = $query->execute();
+ while ($states_list_data = $states_list->fetchObject())
+ {
+ $states[$states_list_data->state] = $states_list_data->state;
+ }
+ return $states;
+ }
+function lm_list_of_cities()
+ {
+ $states = array(
+ 0 => '-Select-'
+ );
+ $query = db_select('list_cities_of_india');
+ $query->fields('list_cities_of_india');
+ $query->orderBy('city', 'ASC');
+ $city_list = $query->execute();
+ while ($city_list_data = $city_list->fetchObject())
+ {
+ $city[$city_list_data->city] = $city_list_data->city;
+ }
+ return $city;
+ }
+ function lm_list_of_software_version()
+ {
+ $software_version = array();
+ $query = db_select('openfoam_software_version');
+ $query->fields('openfoam_software_version');
+ $query->orderBy('id', 'ASC');
+ $software_version_list = $query->execute();
+ while ($software_version_list_data = $software_version_list->fetchObject())
+ {
+ $software_version[$software_version_list_data->version] = $software_version_list_data->version;
+ }
+ return $software_version;
+ } \ No newline at end of file