Fix: add resprint for passwordforgotten
This commit is contained in:
parent
570c683b99
commit
0ce51fcb87
@ -88,14 +88,20 @@ if ($disablenofollow) echo '</a>';
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
if (! empty($morelogincontent)) {
|
||||
if (is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $morelogincontent;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -175,6 +181,20 @@ if (! empty($hookmanager->resArray['options'])) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'js') {
|
||||
echo "\n".'<!-- Javascript by hook -->';
|
||||
echo $option."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (! empty($moreloginextracontent)) {
|
||||
echo '<!-- Javascript by hook -->';
|
||||
echo $moreloginextracontent;
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div> <!-- end of center -->
|
||||
|
||||
@ -224,10 +224,19 @@ if (function_exists("imagecreatefrompng") && ! $disabled)
|
||||
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||
}
|
||||
|
||||
// Execute hook getPasswordForgottenPageOptions
|
||||
// Should be an array with differents options in $hookmanager->resArray
|
||||
// Execute hook getPasswordForgottenPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$hookmanager->executeHooks('getPasswordForgottenPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Execute hook getPasswordForgottenPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getPasswordForgottenPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
include $template_dir.'passwordforgotten.tpl.php'; // To use native PHP
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user