1
0

new.html.erb 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <% content_for :title, "Sign up" -%>
  2. <div class='container'>
  3. <div class='row'>
  4. <div class='col-md-8 col-md-offset-2'>
  5. <div class='well'>
  6. <h2>Sign up</h2>
  7. <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
  8. <%= render "devise/shared/error_messages", resource: resource %>
  9. <% if ENV['ON_HEROKU'] && User.count.zero? %>
  10. <div class="heroku-instructions">
  11. <% app_name = request.host[/\A[^.]+/] %>
  12. <p>If you are the owner of this application, take the following steps to complete the setup:</p>
  13. <ul>
  14. <li>Read <a href="https://github.com/huginn/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>
  15. <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>
  16. <li>Run the following commands:<br />
  17. <%= content_tag :pre do -%>
  18. git clone https://github.com/huginn/huginn.git <%= content_tag :var, app_name %>
  19. cd <%= content_tag :var, app_name %>
  20. heroku git:remote -a <%= content_tag :var, app_name %>
  21. cp .env.example .env
  22. gem install bundler
  23. bundle
  24. bin/setup_heroku
  25. <%- end %>
  26. <li>This command will create an admin account for you.</li>
  27. </ul>
  28. </div>
  29. <% end %>
  30. <% if User.using_invitation_code? %>
  31. <div class="form-group">
  32. <%= f.label :invitation_code, class: 'col-md-4 control-label' %>
  33. <div class="col-md-6">
  34. <%= f.text_field :invitation_code, class: 'form-control' %>
  35. <span class="help-inline">We are not yet open to the public. If you have an invitation code, please enter it here.</span>
  36. </div>
  37. </div>
  38. <% end %>
  39. <%= render partial: 'common_registration_fields', locals: { f: f } %>
  40. <div class="form-group">
  41. <div class="col-md-offset-4 col-md-10">
  42. <%= f.submit "Sign up", class: "btn btn-primary" %>
  43. </div>
  44. </div>
  45. <% end %>
  46. <%= render "devise/shared/links" %>
  47. </div>
  48. </div>
  49. </div>
  50. </div>