From 675f198a7c7254326ac3ff25be2e05242e409611 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 10 Sep 2012 20:15:45 +0400 Subject: [PATCH] rework login form --- backend.php | 14 --- classes/handler/public.php | 2 +- include/login_form.php | 229 +++++++++++++++++++------------------ mobile/login_form.php | 2 - tt-rss.css | 47 -------- 5 files changed, 121 insertions(+), 173 deletions(-) diff --git a/backend.php b/backend.php index 87b0945b1..bf87b55d3 100644 --- a/backend.php +++ b/backend.php @@ -63,20 +63,6 @@ authenticate_user($link, "admin", null); } - // TODO remove and handle within Handlers - - /* if (!($_SESSION["uid"] && validate_session($link))) { - if ($op == 'pref-feeds' && $method == 'add') { - header("Content-Type: text/html"); - login_sequence($link); - render_login_form($link); - } else { - header("Content-Type: text/plain"); - print json_encode(array("error" => array("code" => 6))); - } - return; - } */ - $purge_intervals = array( 0 => __("Use default"), -1 => __("Never purge"), diff --git a/classes/handler/public.php b/classes/handler/public.php index 998e078dd..4b595d49a 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -199,7 +199,7 @@ class Handler_Public extends Handler { $result = db_query($this->link, "SELECT * FROM ttrss_settings_profiles,ttrss_users WHERE ttrss_users.id = ttrss_settings_profiles.owner_uid AND login = '$login' ORDER BY title"); - print ""; print ""; diff --git a/include/login_form.php b/include/login_form.php index 5060f8c11..ba2917efa 100644 --- a/include/login_form.php +++ b/include/login_form.php @@ -5,35 +5,88 @@ - + + + - + + - -
+ dojoType="dijit.form.Form" method="POST" id="loginForm" name="loginForm"> - + - - - - - - - - - -
- -
- -
- - - - - - - - - + - - +
+ -
- - + -
+ + + +
+ +
+ +
+ + ">
">
+ dojoType="dijit.form.TextBox" required="1" + value="" /> + + +
+ + "/> +
+ +
+ -
- -
+ - + + +
+ + + +
+ +
+ - +
-
- -
- -
- -
-
+ + +
+
diff --git a/mobile/login_form.php b/mobile/login_form.php index 48f7cc5ad..98c0bfdbc 100644 --- a/mobile/login_form.php +++ b/mobile/login_form.php @@ -36,8 +36,6 @@ function do_login() {
- -
diff --git a/tt-rss.css b/tt-rss.css index 25b51e48b..a8286ef9a 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -466,10 +466,6 @@ div.prefHelp, td.prefHelp { padding : 5px; } -table.loginForm { - background-color : #ecf4ff; -} - span.feed_error { color : red; } @@ -778,49 +774,6 @@ form { width : 100%; } -table.loginForm2 { - padding : 1em; - width : 100%; -} - -table.loginForm2 .loginTop { - border-width : 0px 0px 1px 0px; - border-color : #88b0f0; - border-style : solid; - padding : 0.5em; -} - -table.loginForm2 .loginMiddle { - padding : 3em; -} - -table.loginForm2 .loginBottom { - border-width : 1px 0px 0px 0px; - border-color : #88b0f0; - border-style : solid; - font-size : 12px; - text-align : center; - color : #909090; - padding : 0.5em; -} - -table.loginForm2 .loginBottom a { - color : gray; -} - -table.loginForm2 .loginBottom a:hover { - color : #4684ff; -} - -table.loginForm2 .loginError { - color : red; - margin : 0.5em; -} - -table.loginForm2 .innerLoginCell { - padding-top : 0.5em; -} - div.loadingPrompt { padding : 1em; text-align : center;