diff --git a/ChangeLog b/ChangeLog index fca13478c08..6022577180a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,7 @@ For translators: For developers: - New: Function yn can show a visual checkbox. - New: Introduced select2 jquery plugin. +- New: Possibility to add javascript in main login page with "getLoginPageOptions" hook WARNING: Following changes may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index f130ac9f7ef..fc62c5b145f 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2009-2015 Regis Houssin * Copyright (C) 2011-2013 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -245,6 +245,18 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?> +resArray['options'])) { + foreach ($hookmanager->resArray['options'] as $format => $option) + { + if ($format == 'js') { + echo "\n".''; + echo $option."\n"; + } + } +} +?> + google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))