From a6a96a503ba4e70bf71e6b8e9fe693702c95c70c Mon Sep 17 00:00:00 2001 From: prashant Date: Thu, 29 Jan 2015 19:58:01 +0530 Subject: done user login mandetory for nonaicte proposal --- textbook_companion.module | 51 ++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 32 deletions(-) (limited to 'textbook_companion.module') diff --git a/textbook_companion.module b/textbook_companion.module index acb6f66..015a7eb 100755 --- a/textbook_companion.module +++ b/textbook_companion.module @@ -536,13 +536,11 @@ function textbook_companion_menu() 'access arguments' => array('paper submission form'), 'type' => MENU_CALLBACK, 'file' => 'cheque_contact.inc', - ); - /*Non AICTE proposal */ + ); $items["nonaicte_proposal"] = array( "title" => "Book Suggestion Form ", "description" => "NON-AICTE Book Proposal Form", - 'page callback' => 'drupal_get_form', - 'page arguments' => array('book_proposal_nonaicte_form'), + 'page callback' => 'textbook_companion_nonaicte_proposal_all', 'access arguments' => array('create book proposal'), 'type' => MENU_NORMAL_ITEM, ); @@ -744,7 +742,7 @@ function textbook_companion_aicte_proposal_all() { } $page_content .= ""; /* adding aicte report form */ - $page_content .= drupal_get_form("textbook_companion_aicte_report_form"); + //$page_content .= drupal_get_form("textbook_companion_aicte_report_form"); return $page_content; } @@ -784,20 +782,22 @@ function textbook_companion_aicte_proposal_all() { //$page_content .= "Do not wish to propose any of the below books: Click here"; $page_content .= "Search : "; $page_content .= ""; - $page_content .= drupal_get_form("textbook_companion_aicte_report_form"); + //$page_content .= drupal_get_form("textbook_companion_aicte_report_form"); $page_content .= drupal_get_form("textbook_companion_aicte_proposal_form"); return $page_content; } - -/* Textbook Companion Proposal */ -function textbook_companion_proposal_all() { +/*non aicte book proposal */ +function textbook_companion_nonaicte_proposal_all() { global $user; $page_content = ""; - // if (!$user->uid) { - // drupal_set_message('It is mandatory to login on this website to access the proposal form', 'error'); - // return; - // } + if (!$user->uid) { + + $page_content .= "