diff --git a/examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js b/examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js index ac2835d..357569e 100644 --- a/examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js +++ b/examples/demo/site/modules/basic_auth/files/js/roc_basic_auth.js @@ -25,7 +25,7 @@ ROC_AUTH.login = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); } }else{ @@ -49,7 +49,7 @@ ROC_AUTH.login = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); } } @@ -93,7 +93,7 @@ ROC_AUTH.login_with_redirect = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); $("#imgProgressRedirect").hide(); } }else{ @@ -122,8 +122,8 @@ ROC_AUTH.login_with_redirect = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); + $(".primary-tabs").append(newdiv); + $("#imgProgressRedirect").hide(); } } diff --git a/examples/demo/site/modules/basic_auth/templates/block_login.tpl b/examples/demo/site/modules/basic_auth/templates/block_login.tpl index a2c142c..c49cf2c 100644 --- a/examples/demo/site/modules/basic_auth/templates/block_login.tpl +++ b/examples/demo/site/modules/basic_auth/templates/block_login.tpl @@ -5,12 +5,12 @@
- +
- +
@@ -25,10 +25,5 @@

-
- {foreach item="item" from="$oauth_consumers"} - Login with {$item/}
- {/foreach} -
{/unless} diff --git a/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e b/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e index b5d321c..0539fef 100644 --- a/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e +++ b/modules/basic_auth/handler/cms_basic_auth_logoff_handler.e @@ -47,6 +47,7 @@ feature -- HTTP Methods l_page: CMS_RESPONSE l_url: STRING i: INTEGER + l_message: STRING do api.logger.put_information (generator + ".do_get Processing basic auth logoff", Void) if attached req.query_parameter ("prompt") as l_prompt then @@ -72,6 +73,10 @@ feature -- HTTP Methods l_page.set_status_code ({HTTP_STATUS_CODE}.found) l_page.set_redirection (l_url) end + create l_message.make_from_string (logout_message) + l_message.replace_substring_all ("$site_login", req.absolute_script_url ("/account/roc-login")) + l_message.replace_substring_all ("$site_home", req.absolute_script_url ("")) + l_page.set_main_content (l_message) l_page.execute end end @@ -113,4 +118,14 @@ feature -- HTTP Methods end end + + feature {NONE}-- Lougout Message + + logout_message: STRING = "[ +
+

You are now signed out

+

You can log in again, or go to the front page.

+
+ ]" + end diff --git a/modules/basic_auth/site/files/js/roc_basic_auth.js b/modules/basic_auth/site/files/js/roc_basic_auth.js index ac2835d..357569e 100644 --- a/modules/basic_auth/site/files/js/roc_basic_auth.js +++ b/modules/basic_auth/site/files/js/roc_basic_auth.js @@ -25,7 +25,7 @@ ROC_AUTH.login = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); } }else{ @@ -49,7 +49,7 @@ ROC_AUTH.login = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); } } @@ -93,7 +93,7 @@ ROC_AUTH.login_with_redirect = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); + $(".primary-tabs").append(newdiv); $("#imgProgressRedirect").hide(); } }else{ @@ -122,8 +122,8 @@ ROC_AUTH.login_with_redirect = function() { var newdiv = document.createElement('div'); newdiv.innerHTML = "
Invalid Credentials
"; newdiv.id = 'myModalFormId'; - $("body").append(newdiv); - $("#imgProgressRedirect").hide(); + $(".primary-tabs").append(newdiv); + $("#imgProgressRedirect").hide(); } } diff --git a/modules/basic_auth/site/templates/block_login.tpl b/modules/basic_auth/site/templates/block_login.tpl index 285744f..c49cf2c 100644 --- a/modules/basic_auth/site/templates/block_login.tpl +++ b/modules/basic_auth/site/templates/block_login.tpl @@ -5,12 +5,12 @@
- +
- +