mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 12:36:26 +02:00
Issue #343 start of fix to make CHAP login via user pages work again (more to do)
This commit is contained in:
@ -38,6 +38,7 @@ e107::css('core', 'core/all.jquery.css', 'jquery');
|
|||||||
e107::js("core", "core/front.jquery.js","jquery",5); // Load all default functions.
|
e107::js("core", "core/front.jquery.js","jquery",5); // Load all default functions.
|
||||||
e107::js("core", "core/all.jquery.js","jquery",5); // Load all default functions.
|
e107::js("core", "core/all.jquery.js","jquery",5); // Load all default functions.
|
||||||
|
|
||||||
|
$js_body_onload = array(); // Legacy array of code to load with page.
|
||||||
|
|
||||||
//
|
//
|
||||||
// *** Code sequence for headers ***
|
// *** Code sequence for headers ***
|
||||||
@ -380,7 +381,9 @@ if (!USER && ($pref['user_tracking'] == "session") && varset($pref['password_CHA
|
|||||||
if ($pref['password_CHAP'] == 2)
|
if ($pref['password_CHAP'] == 2)
|
||||||
{
|
{
|
||||||
// *** Add in the code to swap the display tags
|
// *** Add in the code to swap the display tags
|
||||||
$js_body_onload[] = "expandit('loginmenuchap','nologinmenuchap');";
|
// $js_body_onload[] = "expandit('loginmenuchap','nologinmenuchap');";
|
||||||
|
$js_body_onload[] = "expandit('loginmenuchap');";
|
||||||
|
$js_body_onload[] = "expandit('nologinmenuchap');";
|
||||||
}
|
}
|
||||||
echo "<script type='text/javascript' src='".e_JS."chap_script.js'></script>\n";
|
echo "<script type='text/javascript' src='".e_JS."chap_script.js'></script>\n";
|
||||||
$js_body_onload[] = "getChallenge();";
|
$js_body_onload[] = "getChallenge();";
|
||||||
@ -506,7 +509,7 @@ if (isset($script_text) && $script_text)
|
|||||||
//if(in_array('fader_menu', $eMenuActive)) $js_body_onload[] = 'changecontent(); ';
|
//if(in_array('fader_menu', $eMenuActive)) $js_body_onload[] = 'changecontent(); ';
|
||||||
|
|
||||||
// External links handling
|
// External links handling
|
||||||
$js_body_onload = array();//'externalLinks();'; - already registered to e107:loaded Event by the new JS API
|
//$js_body_onload = array();//'externalLinks();'; - already registered to e107:loaded Event by the new JS API
|
||||||
|
|
||||||
// Theme JS
|
// Theme JS
|
||||||
// XXX DEPRECATED $body_onload and related functionality
|
// XXX DEPRECATED $body_onload and related functionality
|
||||||
@ -568,7 +571,7 @@ echo "</head>\n";
|
|||||||
{
|
{
|
||||||
$HEADER = "";
|
$HEADER = "";
|
||||||
$FOOTER = "";
|
$FOOTER = "";
|
||||||
$body_onload = " style='padding:15px;margin:0px'"; //TODO e-iframe css class.
|
$body_onload .= " style='padding:15px;margin:0px'"; //TODO e-iframe css class.
|
||||||
}
|
}
|
||||||
|
|
||||||
$HEADER = str_replace("{e_PAGETITLE}",deftrue('e_PAGETITLE',''),$HEADER);
|
$HEADER = str_replace("{e_PAGETITLE}",deftrue('e_PAGETITLE',''),$HEADER);
|
||||||
@ -580,7 +583,15 @@ if(!deftrue('BODYTAG')) //TODO Discuss a better way?
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo BODYTAG."\n";
|
if ($body_onload)
|
||||||
|
{
|
||||||
|
// Kludge to get the CHAP code included
|
||||||
|
echo substr(trim(BODYTAG), 0, -1).' '.$body_onload.">\n"; // FIXME - must be a better way!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo BODYTAG."\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bootstrap Modal Window - too important to template.
|
// Bootstrap Modal Window - too important to template.
|
||||||
|
@ -90,10 +90,23 @@ $LOGIN_TEMPLATE['page']['header'] = "
|
|||||||
|
|
||||||
$LOGIN_TEMPLATE['page']['body'] = '
|
$LOGIN_TEMPLATE['page']['body'] = '
|
||||||
|
|
||||||
<h2 class="form-signin-heading">'.LAN_LOGIN_4.'</h2>
|
<h2 class="form-signin-heading">'.LAN_LOGIN_4.'</h2>';
|
||||||
|
if ($pref['password_CHAP'] == 2)
|
||||||
|
{
|
||||||
|
$LOGIN_TEMPLATE['page']['body'] .= "
|
||||||
|
<div style='text-align: center' id='nologinmenuchap'>"."Javascript must be enabled in your browser if you wish to log into this site"."
|
||||||
|
</div>
|
||||||
|
<span style='display:none' id='loginmenuchap'>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$LOGIN_TEMPLATE['page']['body'] .= "<span>";
|
||||||
|
}
|
||||||
|
$LOGIN_TEMPLATE['page']['body'] .= '
|
||||||
{LOGIN_TABLE_USERNAME}
|
{LOGIN_TABLE_USERNAME}
|
||||||
{LOGIN_TABLE_PASSWORD}
|
{LOGIN_TABLE_PASSWORD}
|
||||||
{LOGIN_TABLE_SECIMG_SECIMG} {LOGIN_TABLE_SECIMG_TEXTBOC}
|
{LOGIN_TABLE_SECIMG_SECIMG} {LOGIN_TABLE_SECIMG_TEXTBOC}
|
||||||
|
</span>
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
{LOGIN_TABLE_AUTOLOGIN} {LOGIN_TABLE_AUTOLOGIN_LAN}
|
{LOGIN_TABLE_AUTOLOGIN} {LOGIN_TABLE_AUTOLOGIN_LAN}
|
||||||
</label>
|
</label>
|
||||||
|
Reference in New Issue
Block a user