From 2983849b1f691c726e63bcae46231f5529b7ae8f Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 25 Jul 2011 14:15:23 -0400 Subject: [PATCH] closet page importer also warns to log in in another window --- app/helpers/closet_pages_helper.rb | 8 ++++++++ app/views/closet_pages/new.html.haml | 19 ++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/helpers/closet_pages_helper.rb b/app/helpers/closet_pages_helper.rb index dab106d2..1ed8454c 100644 --- a/app/helpers/closet_pages_helper.rb +++ b/app/helpers/closet_pages_helper.rb @@ -1,2 +1,10 @@ module ClosetPagesHelper + def link_to_neopets_login(content) + link_to content, neopets_login_url, :target => "_blank" + end + + def neopets_login_url + "http://www.neopets.com/loginpage.phtml" + end end + diff --git a/app/views/closet_pages/new.html.haml b/app/views/closet_pages/new.html.haml index ae504a69..fc2b9c35 100644 --- a/app/views/closet_pages/new.html.haml +++ b/app/views/closet_pages/new.html.haml @@ -20,13 +20,18 @@ 1. Check the framed Neopets.com window on the left, pointing to [page #{@closet_page.index} of your closet][cp]. - * **Log in if you haven't already.** If you're logged into - Neopets, but not in this frame, enable "third-party cookies" in your - browser. (Most have that on by default.) - * **Confirm that the page is, in fact, your closet.** Don't just trust a - website when they tell you to copy-paste the source code of another site. - Instead, check that the page is what it is supposed to be and does not - contain any information you didn't mean to give out. + * **Confirm that you're logged in.** If you're logged into + Neopets, but the above frame says that you're not, try enabling + "third-party cookies" in your browser. (Most have that on by default.) + * **If you haven't logged in, #{link_to_neopets_login "do so in another window"}.** + It's never a good idea to log in inside of a frame, unless you're a + web programmer pro who can check that the frame does, in fact, point + to Neopets.com. To be safe, + #{link_to_neopets_login "pull up another window, check the URL, and log in safely"}. + * **Confirm that the page is, in fact, your closet.** Similarly, don't + just trust a website when they tell you to copy-paste the source code + of another site. Instead, check that the page is what it is supposed to + be and does not contain any information you didn't mean to give out. 2. View the frame's source code. * **In Google Chrome,** right-click the frame and choose **View Frame Source**.