From c2d26e21c32aedc51b474e8c2b2562d9706daf11 Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Sat, 5 Feb 2011 20:19:47 -0800 Subject: [PATCH] added a mobile invitation acceptance view, skipping getting started for now --- app/controllers/aspects_controller.rb | 2 +- app/views/invitations/edit.mobile.haml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 app/views/invitations/edit.mobile.haml diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index af33ad4fd..56c34f0bc 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -17,7 +17,7 @@ class AspectsController < ApplicationController end # redirect to signup - if current_user.getting_started == true || @aspects.blank? + if (current_user.getting_started == true || @aspects.blank?) && !request.format.mobile? redirect_to getting_started_path else diff --git a/app/views/invitations/edit.mobile.haml b/app/views/invitations/edit.mobile.haml new file mode 100644 index 000000000..a388f6c2d --- /dev/null +++ b/app/views/invitations/edit.mobile.haml @@ -0,0 +1,18 @@ += form_for(resource, :as => resource_name, :url => invitation_path(resource_name), :html => {:method => :put }) do |f| + %p + = f.label :username , t('username') + = f.text_field :username, :title => t('registrations.new.enter_username') + %p + = f.label :email , t('email') + = f.text_field :email, :title => t('registrations.new.enter_email') + %p + = f.label :password , t('password') + = f.password_field :password, :title => t('registrations.new.enter_password') + %p + = f.label :password_confirmation , t('password_confirmation') + = f.password_field :password_confirmation, :title => t('registrations.new.enter_password_again') + = f.hidden_field :invitation_token + + = f.submit t('registrations.new.sign_up') + %br + = render :partial => "devise/shared/links"