app/views/iugu/registrations/new.html.haml in iugusdk-1.0.0.alpha.27 vs app/views/iugu/registrations/new.html.haml in iugusdk-1.0.0.alpha.28
- old
+ new
@@ -13,10 +13,14 @@
- if resource.errors.size > 0
.notice.notice-red
= f.error_notification
+ - unless flash[:error].blank?
+ .notice.notice-red
+ = flash[:error]
+
%h6.no-bottom-margin
= I18n.t("iugu.sign_up")
- if IuguSDK::enable_guest_user
.element-spacing
@@ -31,11 +35,11 @@
= f.input :password_confirmation, :required => false, :placeholder => I18n.t("activerecord.attributes.password_confirmation"), :label => false
- if IuguSDK::enable_alias_on_signup
= f.input :account_alias, :label => 'Alias'
= render :partial => "iugu/shared/signup_fields", :locals => {:f => f}
= f.hidden_field :locale, :value => @matched_locale_from_browser
- - unless params[:invitation_token].blank?
- = f.hidden_field :user_invitation, :value => params[:invitation_token]
+ - if !params[:invitation_token].blank? || !params[:user].try(:[], :user_invitation).blank?
+ = f.hidden_field :user_invitation, :value => params[:invitation_token] || params[:user][:user_invitation]
- if IuguSDK::enable_subscription_features
= f.hidden_field :plan_identifier, value: @plan_identifier
= f.hidden_field :currency, value: @currency
.actions
= f.button :submit, I18n.t("iugu.sign_up"), :class => "full-width default no-bottom-margin"