summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashant2015-10-16 11:46:17 +0530
committerprashant2015-10-16 11:46:17 +0530
commit930c6ac12538237c4e51f1bd2cd01454e6906abc (patch)
treeef36869b5ac2b22718cbe8323d3b6c555aa4d4e3
parent4c37658ead0218b14d733b4e2b45085cddace766 (diff)
downloadDWSIM_lab_migration_module-930c6ac12538237c4e51f1bd2cd01454e6906abc.tar.gz
DWSIM_lab_migration_module-930c6ac12538237c4e51f1bd2cd01454e6906abc.tar.bz2
DWSIM_lab_migration_module-930c6ac12538237c4e51f1bd2cd01454e6906abc.zip
done mioner changes
-rwxr-xr-xbulk_approval.inc33
1 files changed, 31 insertions, 2 deletions
diff --git a/bulk_approval.inc b/bulk_approval.inc
index 55d35fc..4be6843 100755
--- a/bulk_approval.inc
+++ b/bulk_approval.inc
@@ -511,6 +511,16 @@ function lab_migration_bulk_approval_form_submit($form, $form_state)
elseif (($form_state['values']['lab_actions'] == 4) && ($form_state['values']['lab_experiment_actions'] == 0) && ($form_state['values']['lab_experiment_solution_actions'] == 0))
{
+ if (!$form_state['values']['message'])
+ {
+ if (strlen(trim($form_state['values']['message'])) <= 30)
+ {
+ form_set_error('message', t(''));
+ drupal_set_message("Please mention the reason for disapproval.", 'error');
+ return;
+ }
+ }
+
if (!user_access('lab migration bulk delete code'))
{
drupal_set_message(t('You do not have permission to Bulk Delete Entire Lab Including Proposal.'), 'error');
@@ -606,9 +616,19 @@ function lab_migration_bulk_approval_form_submit($form, $form_state)
);
}
- elseif (($form_state['values']['lab_actions'] == 1) && ($form_state['values']['lab_experiment_actions'] == 3) && ($form_state['values']['lab_experiment_solution_actions'] == 0))
+ elseif (($form_state['values']['lab_actions'] == 0) && ($form_state['values']['lab_experiment_actions'] == 3) && ($form_state['values']['lab_experiment_solution_actions'] == 0))
{
+ if (!$form_state['values']['message'])
+ {
+ if (strlen(trim($form_state['values']['message'])) <= 30)
+ {
+ form_set_error('message', t(''));
+ drupal_set_message("Please mention the reason for disapproval.", 'error');
+ return;
+ }
+ }
+
if (!user_access('lab migration bulk delete code'))
{
drupal_set_message(t('You do not have permission to Bulk Dis-Approved and Deleted Entire Experiment.'), 'error');
@@ -668,6 +688,15 @@ function lab_migration_bulk_approval_form_submit($form, $form_state)
}
elseif (($form_state['values']['lab_actions'] == 0) && ($form_state['values']['lab_experiment_actions'] == 0) && ($form_state['values']['lab_experiment_solution_actions'] == 3))
{
+ if (!$form_state['values']['message'])
+ {
+ if (strlen(trim($form_state['values']['message'])) <= 30)
+ {
+ form_set_error('message', t(''));
+ drupal_set_message("Please mention the reason for disapproval.", 'error');
+ return;
+ }
+ }
if (lab_migration_delete_solution($form_state['values']['lab_solution_list']))
{
@@ -692,7 +721,7 @@ function lab_migration_bulk_approval_form_submit($form, $form_state)
else
{
- drupal_set_message("Please select any one action", 'error');
+ drupal_set_message("Please select any one action at a time", 'error');
return;
}