diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 6f7df11c..656f4157 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -9,6 +9,7 @@ class RegistrationsController < Devise::RegistrationsController def new super + if params[:referral] session[:referral] = params[:referral] end diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index 24a9710f..5c283195 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -22,28 +22,28 @@ <% 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 'Name', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %> + <%= f.text_field :name, autofocus: true, placeholder: "Name", 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 'Email', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %> + <%= f.email_field :email, placeholder: "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 #{'(' + @minimum_password_length.to_s + ' characters minimum)' if @minimum_password_length.present?}", class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %> + <%= f.password_field :password, placeholder: "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 'Password confirmation', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %> + <%= f.password_field :password_confirmation, placeholder: "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' %>
-
- <%= 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. +
+ <%= f.label 'Email updates', class: 'inline-flex items-center', for: :email_updates do %> + <%= f.check_box :email_updates, class: 'mr-4 h-12 w-12' %> + + We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates by email about + new features. <% end %>
@@ -71,11 +71,12 @@ 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-notebook-blue border border-transparent rounded-lg active:bg-blue-500 hover:bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline-blue' %> + <%= 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-notebook-blue border border-transparent rounded-lg active:bg-blue-500 hover:bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline-blue cursor-pointer' %> <% end %> -
- <%= render "devise/shared/links" %> +
+ Already have an account? + <%= link_to 'Sign in instead.', new_user_session_path, class: 'text-notebook-blue hover:border-notebook-blue border-b-2' %>
diff --git a/app/views/devise/sessions/_form.html.erb b/app/views/devise/sessions/_form.html.erb index 18538e71..201282b6 100644 --- a/app/views/devise/sessions/_form.html.erb +++ b/app/views/devise/sessions/_form.html.erb @@ -12,7 +12,8 @@
<%= f.label :remember_me, class: 'inline-flex items-center cursor-pointer' do %> - + + Remember me <% end %>