Fix: add resprint for passwordforgotten
This commit is contained in:
parent
570c683b99
commit
0ce51fcb87
@ -88,8 +88,9 @@ if ($disablenofollow) echo '</a>';
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($hookmanager->resArray['options'])) {
|
if (! empty($morelogincontent)) {
|
||||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
if (is_array($morelogincontent)) {
|
||||||
|
foreach ($morelogincontent as $format => $option)
|
||||||
{
|
{
|
||||||
if ($format == 'table') {
|
if ($format == 'table') {
|
||||||
echo '<!-- Option by hook -->';
|
echo '<!-- Option by hook -->';
|
||||||
@ -97,6 +98,11 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo '<!-- Option by hook -->';
|
||||||
|
echo $morelogincontent;
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if ($captcha) {
|
<?php if ($captcha) {
|
||||||
@ -175,6 +181,20 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?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>
|
||||||
</div> <!-- end of center -->
|
</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"');
|
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute hook getPasswordForgottenPageOptions
|
// Execute hook getPasswordForgottenPageOptions (for table)
|
||||||
// Should be an array with differents options in $hookmanager->resArray
|
|
||||||
$parameters=array('entity' => GETPOST('entity','int'));
|
$parameters=array('entity' => GETPOST('entity','int'));
|
||||||
$hookmanager->executeHooks('getPasswordForgottenPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks
|
$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
|
include $template_dir.'passwordforgotten.tpl.php'; // To use native PHP
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user