Browse Source

Use twitter bootstrap classes on login

denney-fix-saving-dates
Jason Denney 11 years ago
parent
commit
df3c29a899
  1. 40
      app/views/devise/sessions/new.html.erb

40
app/views/devise/sessions/new.html.erb

@ -5,34 +5,44 @@
<br>
<br>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<div><%= f.label :username%><br />
<%= f.text_field :username%></div>
<div class="form-group">
<%= f.text_field :username, placeholder: "Username", class: "form-control input-lg"%>
</div>
<div><%= f.label :password %><br />
<%= f.password_field :password %></div>
<div class="form-group">
<%= f.password_field :password, placeholder: "Password", class: "form-control input-lg" %>
</div>
<div class="form-group">
<% if devise_mapping.rememberable? -%>
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
<label>
<%= f.check_box :remember_me %> Remember Me
</label>
<% end -%>
</div>
<div><%= f.submit "Sign in" %></div>
<div id="checkin_menu"style="display:none;">
<input id="checkin" name="checkin" type="button" value="CHECK IN">
<input id="checkout" name="checkout" type="button" value="CHECK OUT">
<div class="form-group">
<p>
<%= f.submit "Sign in", class:"btn btn-lg btn-primary" %>
</p>
<p> Or quickly... </p>
<div class="btn-group">
<input id="checkin" name="checkin" type="button" value="CHECK IN" class="btn btn-lg btn-success">
<input id="checkout" name="checkout" type="button" value="CHECK OUT" class="btn btn-lg btn-danger">
</div>
</div>
<% end %>
<%= render "links" %>
<% if Rails.env.development? %>
<p>
<% User.all.each do |user| %>
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
<%= f.hidden_field :username, :value => user.username%></div>
<%= f.hidden_field :password, :value => 'password' %></div>
<div><%= f.submit "Sign in as #{user.username}" %></div>
<%= f.hidden_field :username, :value => user.username%>
<%= f.hidden_field :password, :value => 'password' %>
<%= f.submit "Sign in as #{user.username}", class:"btn btn-info" %>
<% end %>
<% end %>
</p>
<% end %>

Loading…
Cancel
Save