-
+
Sign up for Notebook.ai
-
-
- <%= image_tag 'logos/both-small.webp', class: 'hide-on-small-only', style: 'width: 100%' %>
- <%= image_tag 'logos/book-small.webp', class: 'hide-on-med-and-up', style: 'width: 100%' %>
-
-
-
- <%= f.label 'Your name' %>
- <%= f.text_field :name, autofocus: true %>
-
-
-
- <%= f.label :email %> (This is the email you will log in with)
- <%= f.email_field :email %>
-
-
-
- <%= f.label :password %>
- <% if @minimum_password_length %>
- (<%= @minimum_password_length %> characters minimum)
- <% end %>
- <%= f.password_field :password, autocomplete: "off" %>
-
+
-
- <%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation, autocomplete: "off" %>
-
-
-
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
+ <% if resource.errors.any? %>
+
+
Please fix the following errors:
+
+ <%= devise_error_messages! %>
+
+
+ <% end %>
+
+ <%= f.label 'Name', class: 'block text-sm' %>
+ <%= f.text_field :name, autofocus: true, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
+
+
+ <%= f.label 'Email', class: 'block text-sm' %>
+ <%= f.email_field :email, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
+
+
+ <%= f.label "Password #{'(' + @minimum_password_length.to_s + ' characters minimum)' if @minimum_password_length.present?}", class: 'block text-sm' %>
+ <%= f.password_field :password, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600', autocomplete: 'off' %>
+
+
+ <%= f.label 'Password confirmation', class: 'block text-sm' %>
+ <%= f.password_field :password_confirmation, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
+
+
+ <%= f.label 'Email updates', class: 'block text-sm' do %>
+ <%= f.check_box :email_updates, checked: false %>
+
+ We're always working to improve Notebook.ai. Please check this box if you'd like to receive occasional updates about
+ what's new.
+
+ <% end %>
+
- <%
- if params.key?('referral') || session.key?('referral')
- referral_code = params['referral'] || session['referral']
- referrer = ReferralCode.where(code: referral_code).first
- if referrer.present?
- %>
-
-
-
- <%= f.label :referral_code %>
- <%= f.text_field :referral_code, value: referral_code, readonly: true %>
+ <%
+ if params.key?('referral') || session.key?('referral')
+ referral_code = params['referral'] || session['referral']
+ referrer = ReferralCode.where(code: referral_code).first
+ if referrer.present?
+ %>
+
+
+
+ <%= f.label :referral_code %>
+ <%= f.text_field :referral_code, value: referral_code, readonly: true %>
+
+
+
+ <%= f.label 'The following user will receive credit for referring you' %>
+ <%= f.text_field :referral_user, value: referrer.user.name.split('@').first, disabled: "disabled" %>
-
- <%= f.label 'The following user will receive credit for referring you' %>
- <%= f.text_field :referral_user, value: referrer.user.name.split('@').first, disabled: "disabled" %>
-
-
- <%
+ <%
+ end
end
- end
- %>
+ %>
-
- <%= f.label :email_updates do %>
- <%= f.check_box :email_updates %>
- We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates about
- what's new.
- <% end %>
-
+ <%= f.submit "Sign up", class: 'block w-full px-4 py-4 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-blue-600 border border-transparent rounded-lg active:bg-blue-600 hover:bg-blue-700 focus:outline-none focus:shadow-outline-blue' %>
+ <% end %>
-
- <%= f.submit "Sign up", class: 'btn btn-large blue' %>
-
-
- <%= render "devise/shared/links" %>
-
+
+ <%= render "devise/shared/links" %>
- <% end %>
+