Commit 5d06a411c41bef3dc88d351efa5a72e95677cfa6
1 parent
6450ed78
Exists in
master
and in
28 other branches
ActionItem56: css + form login corrigido
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1081 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
4 changed files
with
28 additions
and
12 deletions
Show diff stats
app/controllers/public/account_controller.rb
... | ... | @@ -15,7 +15,7 @@ class AccountController < PublicController |
15 | 15 | def login |
16 | 16 | @user = User.new |
17 | 17 | return unless request.post? |
18 | - self.current_user = User.authenticate(params[:login], params[:password]) | |
18 | + self.current_user = User.authenticate(params[:user][:login], params[:user][:password]) | |
19 | 19 | if logged_in? |
20 | 20 | if params[:remember_me] == "1" |
21 | 21 | self.current_user.remember_me | ... | ... |
app/views/account/login.rhtml
1 | 1 | <h1><%= _('Login') %></h1> |
2 | 2 | |
3 | -<% form_tag do -%> | |
4 | - <p class='formfield text_field'><label class='formlabel' for="login"> <%= _('Username') %> </label><br/> | |
5 | -<%= text_field_tag 'login' %></p> | |
3 | +<% labelled_form_for :user, @user do |f| %> | |
6 | 4 | |
7 | -<p class='formfield text_field'><label class='formlabel' for="password"> <%= _('Password') %></label><br/> | |
8 | -<%= password_field_tag 'password' %></p> | |
5 | +<%= f.text_field :login %> | |
9 | 6 | |
10 | -<!-- Uncomment this if you want this functionality | |
11 | -<p><label for="remember_me">Remember me:</label> | |
12 | -<%= check_box_tag 'remember_me' %></p> | |
13 | ---> | |
7 | +<%= f.password_field :password %> | |
14 | 8 | |
15 | 9 | <p class='submitline'><%= submit_tag 'Log in', {:class => 'submit'} %></p> |
16 | -<% end -%> | |
17 | 10 | |
11 | +<% end %> | |
18 | 12 | |
19 | 13 | <p> |
20 | 14 | <%= link_to _("I forgot my password!"), :action => 'forgot_password' %> | ... | ... |
public/designs/templates/default/stylesheets/forms.css
... | ... | @@ -16,9 +16,14 @@ |
16 | 16 | border: 1px solid #999; |
17 | 17 | border-top: none; |
18 | 18 | border-left: none; |
19 | - padding: 3px; | |
20 | 19 | color: #585858; |
21 | 20 | } |
21 | +.formfield input { | |
22 | + text-indent: 5px; | |
23 | +} | |
24 | +.formfield textarea { | |
25 | + padding: 0px 5px; | |
26 | +} | |
22 | 27 | |
23 | 28 | .submitline { |
24 | 29 | text-align: center; | ... | ... |
... | ... | @@ -0,0 +1,17 @@ |
1 | +#!/bin/bash | |
2 | + | |
3 | +if [ "$1" = "" ]; then | |
4 | + echo " | |
5 | + Usage: | |
6 | + $0 <text to serach> [<file extension>] | |
7 | + " | |
8 | + exit 1 | |
9 | +fi | |
10 | + | |
11 | +if [ "$2" = "" ]; then | |
12 | + ext='.*' | |
13 | +else | |
14 | + ext="$2" | |
15 | +fi | |
16 | + | |
17 | +grep -r --ignore-case "$1" . | grep --ignore-case "\.$ext:" | ... | ... |