diff --git a/plugin/azure_active_directory/index.php b/plugin/azure_active_directory/index.php
index a63dfce7fa..2f9183f341 100644
--- a/plugin/azure_active_directory/index.php
+++ b/plugin/azure_active_directory/index.php
@@ -17,4 +17,18 @@ if ($activeDirectoryPlugin->get(AzureActiveDirectory::SETTING_ENABLE) === 'true'
if ('true' === $activeDirectoryPlugin->get(AzureActiveDirectory::SETTING_FORCE_LOGOUT_BUTTON)) {
$_template['signout_url'] = $activeDirectoryPlugin->getUrl(AzureActiveDirectory::URL_TYPE_LOGOUT);
}
+
+ $managementLoginEnabled = 'true' === $activeDirectoryPlugin->get(AzureActiveDirectory::SETTING_MANAGEMENT_LOGIN_ENABLE);
+
+ $_template['management_login_enabled'] = $managementLoginEnabled;
+
+ if ($managementLoginEnabled) {
+ $managementLoginName = $activeDirectoryPlugin->get(AzureActiveDirectory::SETTING_MANAGEMENT_LOGIN_NAME);
+
+ if (empty($managementLoginName)) {
+ $managementLoginName = $activeDirectoryPlugin->get_lang('ManagementLogin');
+ }
+
+ $_template['management_login_name'] = $managementLoginName;
+ }
}
diff --git a/plugin/azure_active_directory/lang/english.php b/plugin/azure_active_directory/lang/english.php
index 77c2d83c09..3360e792c7 100644
--- a/plugin/azure_active_directory/lang/english.php
+++ b/plugin/azure_active_directory/lang/english.php
@@ -17,5 +17,11 @@ $strings['app_secret'] = 'Application secret';
$strings['force_logout'] = 'Force logout button';
$strings['force_logout_help'] = 'Show a button to force logout session from Azure.';
$strings['block_name'] = 'Block name';
+$strings['management_login_enable'] = 'Management login';
+$strings['management_login_enable_help'] = 'Disable the chamilo login and enable an alternative login page for users.
'
+ .'You will need copy the /plugin/azure_active_directory/layout/login_form.tpl file to /main/template/overrides/layout/ directory.';
+$strings['management_login_name'] = 'Name for the management login';
+$strings['management_login_name_help'] = 'By default is "Management Login".';
$strings['OrganisationEmail'] = 'Organisation e-mail';
$strings['AzureId'] = 'Azure ID (mailNickname)';
+$strings['ManagementLogin'] = 'Management Login';
diff --git a/plugin/azure_active_directory/layout/login_form.tpl b/plugin/azure_active_directory/layout/login_form.tpl
new file mode 100644
index 0000000000..bed575acaf
--- /dev/null
+++ b/plugin/azure_active_directory/layout/login_form.tpl
@@ -0,0 +1,44 @@
+{% if _u.logged == 0 %}
+ {% if login_form %}
+