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

Loading…
Cancel
Save