Commit 94bcbb0a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Include pieforms in searchform function

parent f5909078
......@@ -28,12 +28,11 @@ define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('pieforms/pieform.php');
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('about'));
$smarty->assign('site_menu', site_menu());
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');
?>
......@@ -118,7 +118,7 @@ function contactus_submit($values) {
$smarty = smarty();
$smarty->assign('page_content', $contactform);
$smarty->assign('site_menu', site_menu());
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');
?>
......@@ -29,11 +29,11 @@ define('PUBLIC', 1);
define('MENUITEM', 'home');
require('init.php');
require_once('pieforms/pieform.php');
// Check for whether the user is logged in, before processing the page. After
// this, we can guarantee whether the user is logged in or not for this page.
if (!$USER->is_logged_in()) {
require_once('pieforms/pieform.php');
$institutions = get_records_menu('institution', '', '', 'name, displayname');
$loginform = get_login_form_js(pieform(array(
'name' => 'login',
......@@ -97,7 +97,7 @@ if (!$USER->is_logged_in()) {
$smarty->assign('login_form', $loginform);
}
else {
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
}
$smarty->assign('page_content', get_site_page_content($pagename));
$smarty->assign('site_menu', site_menu());
......
......@@ -1312,7 +1312,8 @@ function pieform_configure() {
}
function searchform() {
return array(
require_once('pieforms/pieform.php');
return pieform(array(
'name' => 'searchform',
'action' => get_config('wwwroot') . 'user/search.php',
'elements' => array(
......@@ -1321,7 +1322,7 @@ function searchform() {
'defaultvalue' => '',
),
)
);
));
}
?>
......@@ -28,12 +28,11 @@ define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('pieforms/pieform.php');
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('privacy'));
$smarty->assign('site_menu', site_menu());
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');
?>
......@@ -28,12 +28,11 @@ define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
require_once('pieforms/pieform.php');
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('termsandconditions'));
$smarty->assign('site_menu', site_menu());
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');
?>
......@@ -57,6 +57,7 @@ else {
}
$smarty = smarty();
$smarty->assign('searchform',searchform());
$smarty->assign('NAME',$name);
$smarty->assign('PROFILE',$profile);
$smarty->display('user/view.tpl');
......
......@@ -26,7 +26,6 @@
define('INTERNAL', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
$wwwroot = get_config('wwwroot');
......@@ -177,7 +176,7 @@ JAVASCRIPT;
$smarty = smarty(array('tablerenderer'));
$smarty->assign('site_menu', site_menu());
$smarty->assign('searchform', pieform(searchform()));
$smarty->assign('searchform', searchform());
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->display('view/index.tpl');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment