• R/O
  • HTTP
  • SSH
  • HTTPS

mint-server: Commit

Math Interactive's web application


Commit MetaInfo

Revisãof0f4382e223de4caf214eda1c4c5bc62f29f3f7e (tree)
Hora2012-02-05 22:40:48
Autorokkez <okkez000@gmai...>
Commiterokkez

Mensagem de Log

do not display OpenID auth/login form.

Mudança Sumário

Diff

--- /dev/null
+++ b/app/views/auth/index.html.erb
@@ -0,0 +1,50 @@
1+<%- @title = p_("MultiAuth", "Login") -%>
2+<%- @enable_side_column = false -%>
3+
4+<div id="dialog">
5+ <%- if false -%>
6+ <h1><%=h p_("MultiAuth", "By OpenID") %></h1>
7+
8+ <%- form_tag(:controller => 'auth/open_id', :action => "login") do -%>
9+ <table>
10+ <tr>
11+ <th><%= label_tag(:openid_url, "OpenID") %></th>
12+ <td>
13+ <%= text_field_tag(:openid_url, "", :size => 30) %>
14+ </td>
15+ </tr>
16+ </table>
17+ <div><%= submit_tag(p_("MultiAuth", "Login")) %></div>
18+ <%- end -%>
19+
20+ <hr />
21+ <%- end -%>
22+ <h1><%=h p_("MultiAuth", "By email address") %></h1>
23+ <%- form_for(:login_form, @login_form, :url => { :controller => 'auth/email', :action => "login"}) do |f| -%>
24+ <table id="email-login">
25+ <tr>
26+ <th><%= f.label(:email) %></th>
27+ <td>
28+ <%= f.text_field(:email, :size => 30) %>
29+ <%= error_message_on(:login_form, :email) %>
30+ </td>
31+ </tr>
32+ <tr>
33+ <th><%= f.label(:password) %></th>
34+ <td>
35+ <%= f.password_field(:password, :size => 30) %>
36+ <%= error_message_on(:login_form, :password) %>
37+ </td>
38+ </tr>
39+ </table>
40+ <%= submit_tag(p_("MultiAuth", "Login")) %>
41+ <%- end -%>
42+
43+</div>
44+
45+<%- unless production? -%>
46+ <div class="debug">
47+ <%= error_messages_for(:login_form) %>
48+ </div>
49+<%- end -%>
50+
--- /dev/null
+++ b/app/views/signup/index.html.erb
@@ -0,0 +1,66 @@
1+
2+<%- @title = p_("MultiAuth", "Register your account") -%>
3+<%- @enable_side_column = false -%>
4+
5+<h1><%=h p_("MultiAuth", "Let's start %{app}!" % { :app => MultiAuth.application_name } ) %></h1>
6+
7+<div><%=h p_("MultiAuth", "Registration is very easy.") %></div>
8+
9+<div>
10+ <%- if false -%>
11+ <div style="float: left; width: 45%; margin-right: 10px;">
12+ <h2><%=h p_("MultiAuth", "Register by OpenID!") %></h2>
13+ <div>
14+ <%- steps = [p_("MultiAuth", "Input OpenID"),
15+ p_("MultiAuth", "OpenID Authentication"),
16+ p_("MultiAuth", "Confirmation"),
17+ p_("MultiAuth", "Registration completed!")] -%>
18+ <%=h p_("MultiAuth", "Flow") %>: <%=h steps.join(" -> ") %>
19+ </div>
20+ <%- form_tag(:controller => "signup/open_id", :action => "authenticate") { -%>
21+ <table>
22+ <tr>
23+ <th><%= label_tag("openid_url", "OpenID URL") %></th>
24+ <td>
25+ <%= text_field_tag("openid_url", @openid_url, :size => 20) %>
26+ </td>
27+ </tr>
28+ </table>
29+ <div><%= submit_tag(p_("MultiAuth", "Next")) %></div>
30+ <%- } -%>
31+ </div>
32+ <%- end -%>
33+ <div style="float: left; width: 45%;">
34+ <h2><%=h p_("MultiAuth", "Register by email address") %></h2>
35+ <div>
36+ <%- steps = [p_("MultiAuth", "Input email address and password"),
37+ p_("MultiAuth", "Confirmation"),
38+ p_("MultiAuth", "Recieve confirmation mail"),
39+ p_("MultiAuth", "Confirmation"),
40+ p_("MultiAuth", "Registration completed!")] -%>
41+ <%=h p_("MultiAuth", "Flow") %>: <%=h steps.join(" -> ") %>
42+ </div>
43+ <%- form_for(:signup_form, @signup_form, :url => {:controller => "signup/email", :action => "validate"}) { |f| -%>
44+ <table>
45+ <tr>
46+ <th><%= f.label(:email) %></th>
47+ <td>
48+ <%= f.text_field(:email, :size => 30) %>
49+ <%= error_message_on(:signup_form, :email) %>
50+ <%= error_message_on(:credential, :email) %>
51+ </td>
52+ </tr>
53+ <tr>
54+ <th><%= f.label(:password) %></th>
55+ <td>
56+ <div><%= f.password_field(:password, :size => 20) %></div>
57+ <div><%= f.password_field(:password_confirmation, :size => 20) %></div>
58+ <%= error_message_on(:signup_form, :password) %>
59+ </td>
60+ </tr>
61+ </table>
62+ <div><%= submit_tag(p_("MultiAuth", "Confirm")) %></div>
63+ <%- } -%>
64+ </div>
65+ <div style="clear: left;"></div>
66+</div>
Show on old repository browser