new.html.erb 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 --app <%= 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. <% if User.using_invitation_code? %>
  27. <div class="form-group">
  28. <%= f.label :invitation_code, class: 'col-md-4 control-label' %>
  29. <div class="col-md-6">
  30. <%= f.text_field :invitation_code, class: 'form-control' %>
  31. <span class="help-inline">We are not yet open to the public. If you have an invitation code, please enter it here.</span>
  32. </div>
  33. </div>
  34. <% end %>
  35. <div class="form-group">
  36. <%= f.label :email, class: 'col-md-4 control-label' %>
  37. <div class="col-md-6">
  38. <%= f.email_field :email, autofocus: true, class: 'form-control' %>
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <%= f.label :username, class: 'col-md-4 control-label' %>
  43. <div class="col-md-6">
  44. <%= f.text_field :username, class: 'form-control' %>
  45. </div>
  46. </div>
  47. <div class="form-group">
  48. <%= f.label :password, class: 'col-md-4 control-label' %>
  49. <div class="col-md-6">
  50. <%= f.password_field :password, autocomplete: "off", class: 'form-control' %>
  51. <% if @validatable %><span class="help-inline"><%= @minimum_password_length %> characters minimum.</span><% end %>
  52. </div>
  53. </div>
  54. <div class="form-group">
  55. <%= f.label :password_confirmation, class: 'col-md-4 control-label' %>
  56. <div class="col-md-6">
  57. <%= f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' %>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <div class="col-md-offset-4 col-md-10">
  62. <%= f.submit "Sign up", class: "btn btn-primary" %>
  63. </div>
  64. </div>
  65. <% end %>
  66. <%= render "devise/shared/links" %>
  67. </div>
  68. </div>
  69. </div>
  70. </div>