summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashantsinalkar2017-02-20 15:00:40 +0530
committerprashantsinalkar2017-02-20 15:00:40 +0530
commit0337eecf763bd5131fc7df1c370d0b447f5e8217 (patch)
treeb91db2db0acf25ae3aabe9188f490a037ada207c
parent24c953406ef01815c1433355eb2610d51c010663 (diff)
parent851a062e17086ecdfb322645e5adf8d55cf3c73e (diff)
downloaddwsim_flowsheet-0337eecf763bd5131fc7df1c370d0b447f5e8217.tar.gz
dwsim_flowsheet-0337eecf763bd5131fc7df1c370d0b447f5e8217.tar.bz2
dwsim_flowsheet-0337eecf763bd5131fc7df1c370d0b447f5e8217.zip
done minor changes
-rwxr-xr-xdwsim_flowsheet.module2
-rwxr-xr-xemail.inc4
-rwxr-xr-xproposal.inc34
3 files changed, 37 insertions, 3 deletions
diff --git a/dwsim_flowsheet.module b/dwsim_flowsheet.module
index b31bb76..01e6c4a 100755
--- a/dwsim_flowsheet.module
+++ b/dwsim_flowsheet.module
@@ -670,7 +670,7 @@ function _df_list_of_dwsim_compound()
$dwsim_compound = array();
$query = db_select('dwsim_flowsheet_compounds_from_dwsim');
$query->fields('dwsim_flowsheet_compounds_from_dwsim');
- $query->orderBy('compound', 'ASC');
+ $query->orderBy('id', 'ASC');
$dwsim_compound_list = $query->execute();
while ($dwsim_compound_list_data = $dwsim_compound_list->fetchObject())
{
diff --git a/email.inc b/email.inc
index 0b3537c..b2d2920 100755
--- a/email.inc
+++ b/email.inc
@@ -356,7 +356,11 @@ List of user defined compounds used in process flowsheet : ' . $user_defined_com
Uploaded user defined compound : ' . $file_name . '
+<<<<<<< HEAD
You can propose a new flowsheet project.
+=======
+You can propose a new flowsheet project proposal.
+>>>>>>> 851a062e17086ecdfb322645e5adf8d55cf3c73e
Best Wishes,
diff --git a/proposal.inc b/proposal.inc
index abc84f2..8d19453 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -254,8 +254,8 @@ Ex: Ethanol (64-17-5)'),
'#type' => 'select',
'#title' => t('List of compounds from DWSIM Database used in process flowsheet'),
'#multiple' => TRUE,
- '#description' => t('List the compound name from DWSIM database as shown below:
-Ex: Ethylene (74-85-1)[You can select multiple options by holding ctrl + left key of mouse]'),
+ '#size' => '20',
+ '#description' => t('Select the compound name from DWSIM database as shown [You can select multiple options by holding ctrl + left key of mouse]'),
'#options' => _df_list_of_dwsim_compound(),
'#required' => TRUE
);
@@ -368,6 +368,36 @@ function dwsim_flowsheet_proposal_form_validate($form, &$form_state)
// $form_state['values']['country'] = $form_state['values']['other_country'];
} //$form_state['values']['city'] == ''
}
+//Validation for project title
+ $from_state['values']['project_title'] = trim($from_state['values']['project_title']);
+ if ($from_state['values']['project_title'] != '')
+ {
+ if (strlen($from_state['values']['project_title']) > 250)
+ {
+ form_set_error('project_title', t('Maximum charater limit is 250 charaters only, please check the length of the project title'));
+ } else if (strlen($from_state['values']['project_title']) < 10)
+ {
+ form_set_error('project_title', t('Minimum charater limit is 10 charaters, please check the length of the project title'));
+ }
+ } else
+ {
+ form_set_error('project_title', t('Project title shoud not be empty'));
+ }
+// validation for Name of compound for which process development is carried out
+ $from_state['values']['process_development_compound_name'] = trim($from_state['values']['process_development_compound_name']);
+ if ($from_state['values']['process_development_compound_name'] != '')
+ {
+ if (strlen($from_state['values']['process_development_compound_name']) >= 50)
+ {
+ form_set_error('process_development_compound_name', t('Maximum charater limit is 50 charaters only, please check the length'));
+ } else if (strlen($from_state['values']['project_title']) < 1)
+ {
+ form_set_error('process_development_compound_name', t('Minimum charater limit is 1 charaters, please check the length'));
+ }
+ } else
+ {
+ form_set_error('process_development_compound_name', t('Field should not be empty'));
+ }
if ($form_state['values']['version'] == 'Old version')
{
if ($form_state['values']['older'] == '')