George
2006-Mar-15 07:52 UTC
[Rails] Any one who can help with how to implement such a login?
http://www.wayfaring.com/
I think it is implemented using rails.
For if u input the wrong url,u can see a "rails" style error hint.
I really like its ajax login system.
from the source of the homepage,it can be seen the login part is:
<div>
<h1>Log In</h1>
<form action="/account/login_ajax" method="post"
onsubmit="new
Ajax.Request(''/account/login_ajax'', {asynchronous:true,
evalScripts:true, parameters:Form.serialize(this)}); return false;">
<b style="color:#fff">Email or Name:</b><br/>
<input id="account_login" name="account[login]"
size="30"
style="width:116px;background:#fff" type="text"
/><br/>
<b style="color:#fff">Password:</b><br/>
<input id="account_password" name="account[password]"
size="30"
style="width:116px;background:#fff" type="password"
/><br/>
<input type="submit" name="login" value="Log In
»"
class="primary"
style="font-size:12px;"/><br/><br/>
<a href="/account/forgot_password"
style="font-size:11px;">Forget your password?</a>
</form>
</div>
which can be implemented using form_remote_tag
but how to do that deeply? Anyone has any idea?
--
Posted via http://www.ruby-forum.com/.
George
2006-Mar-15 07:57 UTC
[Rails] Re: Any one who can help with how to implement such a login?
I plan to use the Login Engine to do the job
in the login.rhtml
I change the source into as follows(just change from form_tag to
form_remote_tag):
<div class="form-padding">
<%= form_remote_tag :action => ''login'' %>
<table>
<%= form_input :text_field, "Login ID", "login",
:size => 30
%><br/>
<%= form_input :password_field, "Password",
"password", :size =>
30 %><br/>
</table>
<div class="button-bar">
<%= submit_tag ''Login'' %>
<%= link_to ''Register for an account'', :action
=> ''signup'' %> |
<%= link_to ''Forgot my password'', :action =>
''forgot_password''
%> </div>
<%= end_form_tag %>
</div>
but as soon as i click the "login" button,nothing happens,anyone who
can
tell me the reason?thanks a lot?
--
Posted via http://www.ruby-forum.com/.
James Adam
2006-Mar-15 08:36 UTC
[Rails] Re: Any one who can help with how to implement such a login?
Have you included the default (prototype, etc) javascripts in your layout? - james On 3/15/06, George <georgeway@163.com> wrote:> I plan to use the Login Engine to do the job > > in the login.rhtml > I change the source into as follows(just change from form_tag to > form_remote_tag): > <div class="form-padding"> > <%= form_remote_tag :action => ''login'' %> > <table> > <%= form_input :text_field, "Login ID", "login", :size => 30 > %><br/> > <%= form_input :password_field, "Password", "password", :size => > 30 %><br/> > </table> > > <div class="button-bar"> > <%= submit_tag ''Login'' %> > <%= link_to ''Register for an account'', :action => ''signup'' %> | > <%= link_to ''Forgot my password'', :action => ''forgot_password'' > %> </div> > <%= end_form_tag %> > </div> > > but as soon as i click the "login" button,nothing happens,anyone who can > tell me the reason?thanks a lot? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~
George
2006-Mar-15 08:52 UTC
[Rails] Re: Re: Any one who can help with how to implement such a lo
yeah,prototype has been included,in fact,the project is extended from the Ajaxscaffold... therefore all the necessaries have been included in the layout. James Adam wrote:> Have you included the default (prototype, etc) javascripts in your > layout? > > - james > > On 3/15/06, George <georgeway@163.com> wrote: >> <%= form_input :password_field, "Password", "password", :size => >> >> but as soon as i click the "login" button,nothing happens,anyone who can >> tell me the reason?thanks a lot$B!*(B >> >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > -- > * J * > ~-- Posted via http://www.ruby-forum.com/.