docbrown/app/views/devise/invitations/edit.html.erb
Ben Halpern da6a6739e5
[deploy] Invite users to join and create password (#9294)
* Initial invitation work

* Add more invitation code

* Add proper registration page

* Fix up tests

* Fix failings

* Fix spec

* Add self-serve auth config

* Add registered condition

* Change profile image call and registered_at test

* Change comment

* Fix copy test

* Stub emojipedia

* Linting

* Add registered at to factory

* Ensure registered for user tag

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Slight changes

* Update recover password flow

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update db/schema.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00

31 lines
1.2 KiB
Text

<% title "Set your Password to Join" %>
<div class="crayons-layout crayons-layout--limited mb-10" style="max-width:640px">
<div class="crayons-notice mt-4">
<h1>Welcome to <%= community_name %></h1>
<h3><%= SiteConfig.tagline %></h3>
</div>
<div class="mt-3 crayons-card p-7 align-left">
<h2>Set a password to access your account</h2>
<%= form_for(resource, as: resource_name, url: invitation_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<%= f.hidden_field :invitation_token, readonly: true %>
<% if f.object.class.require_password_on_accepting %>
<div class="crayons-field mt-5">
<%= f.label :password, class: "crayons-field__label" %>
<%= f.password_field :password, class: "crayons-textfield" %>
</div>
<div class="crayons-field">
<%= f.label :password_confirmation, class: "crayons-field__label" %>
<%= f.password_field :password_confirmation, class: "crayons-textfield" %>
</div>
<% end %>
<div class="mt-6">
<%= f.submit t("devise.invitations.edit.submit_button"), class: "crayons-btn" %>
</div>
<% end %>
</div>
</div>