Skip to content

Instantly share code, notes, and snippets.

@minimul
Last active November 9, 2022 18:52
Show Gist options
  • Save minimul/2765d350380cf3e8850724d04061a9f3 to your computer and use it in GitHub Desktop.
Save minimul/2765d350380cf3e8850724d04061a9f3 to your computer and use it in GitHub Desktop.
<%= render 'devise/shared/form_shell', captured: capture { %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>
<div>
<%= f.label :email, class: tw_label %>
<%= tw_form_field_wrap f.email_field :email, autocomplete: "email", required: true, autofocus: true, class: tw_field %>
</div>
<%= f.fields_for :account, f.object.account || Account.new do |a| %>
<div class="mt-6">
<%= a.label :name, 'Organization Name', class: tw_label %>
<%= tw_form_field_wrap a.text_field :name, required: true, class: 'tw_field' %>
</div>
<% end %>
<div class="mt-6">
<%= f.label :password, class: tw_label %>
<% if @minimum_password_length %>
<em>(<%= @minimum_password_length %> characters minimum)</em>
<% end %><br />
<%= tw_form_field_wrap f.password_field :password, autocomplete: "new-password", class: tw_field %>
</div>
<div class="mt-6">
<%= f.label :password_confirmation, class: tw_label %>
<%= tw_form_field_wrap f.password_field :password_confirmation, autocomplete: "new-password", class: tw_field %>
</div>
<div class="mt-6">
<span class="block w-full rounded-md shadow-sm">
<%= f.submit "Sign up", class: tw_full_width_button %>
<%= recaptcha_execute('signup') %>
</span>
</div>
<% end %>
<% } # capture %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment