Improved noscript warning on login page.

Also add 'foodsoft' to title. closes #48
This commit is contained in:
Benjamin Meichsner 2009-10-17 18:42:07 +02:00
parent 1f218f77a0
commit 0b6b5eb0b5
2 changed files with 19 additions and 9 deletions

View file

@ -4,7 +4,8 @@
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title= "FoodSoft - " + (yield(:title) or controller.controller_name)
= stylesheet_link_tag 'foodsoft'
= javascript_include_tag 'prototype'
= javascript_include_tag 'prototype'
= yield(:head)
%body
#login
- if yield(:title)

View file

@ -1,6 +1,20 @@
- title "Login"
- content_for :head do
:javascript
document.observe("dom:loaded", function() {
// initially hide javascript warn message, when javascript is available
$('javascript-warn').hide(); $('login-form').show();
.edit_form{:style => "width:25em"}
$('login_user').focus();
});
- title "FoodSoft login"
#javascript-warn.error(style="font-size:1.5em")
%b Achtung, Cookies und Javascript müssen aktiviert sein!
= link_to "NoScript", "http://noscript.net/"
bitte abschalten.
#login-form.edit_form(style="width:25em;display:none")
- form_tag :action => 'login' do
- if flash[:notice]
%div.notice= flash[:notice]
@ -16,9 +30,4 @@
= password_field 'login', 'password'
= submit_tag "Anmelden"
|
= link_to "Passwort vergessen?", :action => 'forgot_password'
%div{:style => 'font-size:0.9em;margin-top:2em;'}
%b Achtung, Cookies und Javascript müssen aktiviert sein!
= link_to "NoScript", "http://noscript.net/"
bitte abschalten.
= javascript_tag("$('login_user').focus()")
= link_to "Passwort vergessen?", :action => 'forgot_password'