new.html.erb 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <%= generate_error flash[:error] %>
  2. <div class="row">
  3. <div class="col-lg-6 col-lg-offset-0">
  4. <div class="well">
  5. <%= form_for(:session, url: login_path, html: { class: 'form session-form' }) do |f| %>
  6. <h2>Please Login</h2>
  7. <div class="form-group">
  8. <%= f.label :user_name, "User Name" %><br />
  9. <%= f.text_field :user_name, value: params[:session] ? params[:session][:user_name] : "", size: 20, class: 'form-control' %>
  10. </div>
  11. <div class="form-group">
  12. <%= f.label :password, "Password" %><br />
  13. <%= f.password_field :password, size: 20, class: 'form-control' %>
  14. </div>
  15. <div class="checkbox">
  16. <label for="session_agree">
  17. <%= f.check_box :agree %> I agree to the terms of <a data-toggle="modal" href="#terms-modal">the EPRI software agreement</a>.
  18. </label>
  19. </div>
  20. <%= f.submit "Login", class: 'btn btn-primary', data: { 'disable-with' => 'Processing...' } %>
  21. <% end %>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="modal" id="terms-modal">
  26. <div class="modal-dialog">
  27. <div class="modal-content">
  28. <div class="modal-header">
  29. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  30. <h2 class="modal-title">EPRI Software Agreement</h2>
  31. </div>
  32. <div class="modal-body">
  33. <h4>EPRI's OpenADR VTN <%= Oadr::VERSION %> </h4>
  34. <address>
  35. Electric Power Research Institute (EPRI)<br/>
  36. 3420 Hillview Ave.<br/>
  37. Palo Alto, CA 94304
  38. </address>
  39. <p>Copyright © <%= Time.now().year %>, Electric Power Research Institute (EPRI)</p>
  40. <p>All rights reserved.</p>
  41. <p>OpenADR is licensed under BSD 3-Clause license.</p>
  42. <p>Redistribution and use in source and binary forms, with or without modification are permitted provided that the following conditions are met:</p>
  43. <ul>
  44. <li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li>
  45. <li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li>
  46. <li>Neither the name of EPRI nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.</li>
  47. </ul>
  48. </div>
  49. </div>
  50. </div>
  51. </div>