1
0

new.html.erb 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <div class='container'>
  2. <div class='row'>
  3. <div class='col-md-8 col-md-offset-2'>
  4. <div class='well'>
  5. <h2>Sign up</h2>
  6. <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
  7. <%= devise_error_messages! %>
  8. <% if ENV['ON_HEROKU'] && User.count.zero? %>
  9. <div class="heroku-instructions">
  10. <% app_name = request.host[/\A[^.]+/] %>
  11. <p>If you are the owner of this application, take the following steps to complete the setup:</p>
  12. <ul>
  13. <li>Read <a href="https://github.com/cantino/huginn/wiki/Run-Huginn-for-free-on-Heroku" target="_target">this document</a> carefully if you are going to try out Huginn for free on <a href="https://id.heroku.com/" target="_target">Heroku</a>.</li>
  14. <li>Install the <a href="https://toolbelt.heroku.com/" target="_target">Heroku Toolbelt</a> and run <kbd>heroku login</kbd>, if you haven't already.</li>
  15. <li>Run the following commands:<br />
  16. <%= content_tag :pre do -%>
  17. heroku git:clone <%= content_tag :var, app_name %>
  18. cd <%= content_tag :var, app_name %>
  19. bundle
  20. bin/setup_heroku
  21. <%- end %>
  22. <li>This command will create an admin account for you.</li>
  23. </ul>
  24. </div>
  25. <% end %>
  26. <div class="form-group">
  27. <%= f.label :invitation_code, class: 'col-md-4 control-label' %>
  28. <div class="col-md-6">
  29. <%= f.text_field :invitation_code, class: 'form-control' %>
  30. <span class="help-inline">We are not yet open to the public. If you have an invitation code, please enter it here.</span>
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <%= f.label :email, class: 'col-md-4 control-label' %>
  35. <div class="col-md-6">
  36. <%= f.email_field :email, autofocus: true, class: 'form-control' %>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <%= f.label :username, class: 'col-md-4 control-label' %>
  41. <div class="col-md-6">
  42. <%= f.text_field :username, class: 'form-control' %>
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. <%= f.label :password, class: 'col-md-4 control-label' %>
  47. <div class="col-md-6">
  48. <%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
  49. <% if @validatable %><span class="help-inline"><%= @minimum_password_length %> characters minimum.</span><% end %>
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <%= f.label :password_confirmation, class: 'col-md-4 control-label' %>
  54. <div class="col-md-6">
  55. <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <div class="col-md-offset-4 col-md-10">
  60. <%= f.submit "Sign up", class: "btn btn-primary" %>
  61. </div>
  62. </div>
  63. <% end %>
  64. <%= render "devise/shared/links" %>
  65. </div>
  66. </div>
  67. </div>
  68. </div>