From be175e969eef38e9aefa7017c7a62dfb57448bec Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Wed, 11 Mar 2015 10:49:16 +0100 Subject: [PATCH] Fix mobile sign up with invitation --- app/assets/stylesheets/mobile/mobile.scss | 4 ++++ .../{_add_contact.html.haml => _add_contact.haml} | 4 ++-- app/views/registrations/new.mobile.haml | 8 +++++--- features/desktop/invitations.feature | 1 - features/mobile/invitations.feature | 12 ++++++++++++ 5 files changed, 23 insertions(+), 6 deletions(-) rename app/views/people/{_add_contact.html.haml => _add_contact.haml} (59%) create mode 100644 features/mobile/invitations.feature diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 7680fc949..d566b4a55 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -985,6 +985,10 @@ select#user_language, #user_auto_follow_back_aspect_id, #aspect_ids_ { color: inherit; background-color: $background-grey; border-radius: 10px; + .img .avatar { + width: 50px; + height: 50px; + } } .search-mobile { diff --git a/app/views/people/_add_contact.html.haml b/app/views/people/_add_contact.haml similarity index 59% rename from app/views/people/_add_contact.html.haml rename to app/views/people/_add_contact.haml index 156f32e88..13e1184bb 100644 --- a/app/views/people/_add_contact.html.haml +++ b/app/views/people/_add_contact.haml @@ -1,8 +1,8 @@ .well = t('.invited_by') .media - .float-right + .pull-right = aspect_membership_dropdown(contact, inviter, false) - = person_image_link(inviter, :class => 'img') + = person_image_link(inviter, :size => :thumb_small, :class => 'img') .bd = person_link(inviter) diff --git a/app/views/registrations/new.mobile.haml b/app/views/registrations/new.mobile.haml index 33f31e89a..1def3be98 100644 --- a/app/views/registrations/new.mobile.haml +++ b/app/views/registrations/new.mobile.haml @@ -34,15 +34,17 @@ = f.label :password, t('password').upcase .controls = f.password_field :password, :placeholder => "••••••••" - + .control-group = f.label :password_confirmation, t('password_confirmation').upcase .controls = f.password_field :password_confirmation, :placeholder => "••••••••" - + - if AppConfig.settings.captcha.enable? = show_simple_captcha(:object => 'user', :code_type => 'numeric') - + + = invite_hidden_tag(invite) + - if AppConfig.settings.terms.enable? = t('registrations.new.terms', terms_link: link_to(t('registrations.new.terms_link'), terms_path, target: "_blank")).html_safe diff --git a/features/desktop/invitations.feature b/features/desktop/invitations.feature index ac94f985d..e1d857d79 100644 --- a/features/desktop/invitations.feature +++ b/features/desktop/invitations.feature @@ -3,7 +3,6 @@ Feature: Invitations Scenario: Accepting an invitation When I visit alice's invitation code url - # Then I should see the "alice is excited" message When I fill in the new user form And I press "Sign up" Then I should see the "welcome to diaspora" message diff --git a/features/mobile/invitations.feature b/features/mobile/invitations.feature new file mode 100644 index 000000000..b2fcf96dc --- /dev/null +++ b/features/mobile/invitations.feature @@ -0,0 +1,12 @@ +@javascript +Feature: Invitations + + Background: + Given I toggle the mobile view + + Scenario: Accepting an invitation + When I visit alice's invitation code url + When I fill in the new user form + And I press "Create my account!" + Then I should see the "welcome to diaspora" message + And I should be able to friend Alice