Skip to content

Commit

Permalink
Merge pull request #1285 from internetee/1279-too-large-space-between…
Browse files Browse the repository at this point in the history
…-confirm-button-and-send-code

decrease space between confirmation and send code buttons
  • Loading branch information
vohmar authored Jul 4, 2024
2 parents 4d46b09 + 5ee800d commit f48de90
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 7 additions & 2 deletions app/controllers/concerns/english_offers/offerable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ def inform_about_invalid_bid_amount
end

def find_or_initialize_autobidder
@autobider = current_user&.autobiders&.find_or_initialize_by(domain_name: @offer.auction.domain_name)
auction = Auction.find_by(uuid: params[:auction_uuid])
auction = @offer.auction if auction.nil?

@autobider = current_user&.autobiders&.find_or_initialize_by(domain_name: auction.domain_name)
end

# rubocop:disable Metrics/AbcSize
def prevent_check_for_invalid_bid
auction = Auction.with_user_offers(current_user.id).find_by(uuid: @offer.auction.uuid)
auction_uuid = params[:auction_uuid].presence || @offer.auction.uuid

auction = Auction.with_user_offers(current_user.id).find_by(uuid: auction_uuid)
return unless bid_is_bad?(auction:, update_params:)

flash[:alert] = I18n.t('english_offers.show.bid_failed', price: auction_highest_prrice_message(auction))
Expand Down
2 changes: 1 addition & 1 deletion app/views/phone_confirmations/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= component 'common/form/text_field', form: f, attribute: :confirmation_code %>
</div>

<div class="c-account__input c-account__input--editable u-mb-20 is-editable">
<div class="c-account__input c-account__input--editable is-editable">
<%= component 'common/form/form_button', form: f, color: 'green', btn_title: t(:submit), options: { data: { turbo: false } } %>
</div>
<% end %>
14 changes: 11 additions & 3 deletions app/views/phone_confirmations/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<style>
@media (max-width: 768px) {
.mobile_view_confirmation_button {
margin-top: -60px;
}
}
</style>

<% content_for :title, t('.title') %>

<div class="o-container">
Expand All @@ -16,7 +24,7 @@
<%= render 'form', phone_confirmation: @phone_confirmation, url: user_phone_confirmations_path %><br />
</div>

<div class="c-account__form">
<div class="c-account__form mobile_view_confirmation_button">
<%= form_with url: send_sms_user_phone_confirmations_path do |f| %>

<% if @captcha_required %>
Expand All @@ -32,9 +40,9 @@

<div class="c-account__input c-account__input--editable u-mb-20 is-editable">
<%if current_user.allow_to_send_sms_again? %>
<button class="ui c-login__button c-btn c-btn--blue", data-timeleft-target='button'><%= I18n.t('phone_confirmations.new.send_code') %></button>
<button class="c-login__btn c-btn c-btn--blue", data-timeleft-target='button'><%= I18n.t('phone_confirmations.new.send_code') %></button>
<% else %>
<button class="ui c-login__button c-btn c-btn--blue", data-timeleft-target='button' disabled><%= I18n.t('phone_confirmations.new.send_again') %></button>
<button class="c-login__btn c-btn c-btn--blue", data-timeleft-target='button' disabled><%= I18n.t('phone_confirmations.new.send_again') %></button>
<% end %>
</div>

Expand Down

0 comments on commit f48de90

Please sign in to comment.