Skip to content

Commit

Permalink
more registration requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Dec 12, 2024
1 parent ea94b2d commit 24a06fe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
18 changes: 0 additions & 18 deletions app/views/competitions/_nav.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -280,21 +280,3 @@
</div>
</div>
</div>

<script>
(function() {
var $nav = $('#competition-nav > .list-group');
$nav.affix({
offset: {
top: function() {
var parentTop = $nav.parent().offset().top;
var affixTopSpacing = 20; // From .bs-affix in wca.scss
return parentTop - affixTopSpacing;
},
bottom: function () {
return (this.bottom = $('.footer').outerHeight(true));
},
},
});
})();
</script>
2 changes: 1 addition & 1 deletion app/views/competitions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= render layout: 'nav' do %>
<%= react_component("CompetitionTabs", {
tabs: @competition.tabs.as_json,
competition: @competition.as_json({ methods: %w[city organizers delegates registration_open registration_close extra_registration_requirements has_fees? competition_events base_entry_fee using_payment_integrations? series_sibling_competitions main_event_id has_rounds? external_registration_page part_of_competition_series? contact use_wca_registration is_probably_over? registration_not_yet_opened? registration_past? competitor_limit competitor_limit_enabled venue_details external_website venue_address latitude_degrees longitude_degrees website has_schedule? country_iso2 events media number_of_bookmarks date_range information]}),
competition: @competition.as_json({ methods: %w[city organizers delegates base_entry_fee_lowest_denomination registration_open registration_close extra_registration_requirements has_fees? competition_events base_entry_fee using_payment_integrations? series_sibling_competitions main_event_id has_rounds? external_registration_page part_of_competition_series? contact use_wca_registration is_probably_over? registration_not_yet_opened? registration_past? competitor_limit competitor_limit_enabled venue_details external_website venue_address latitude_degrees longitude_degrees website has_schedule? country_iso2 events media number_of_bookmarks date_range information]}),
wcifEvents: @competition.events_wcif, wcifSchedule: @competition.schedule_wcif, locale: I18n.locale,
userInfo: current_user.as_json({
only: %w[wca_id unconfirmed_wca_id],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function RegistrationRequirements({ competition, userInfo, showLi
<p>
{competition.base_entry_fee_lowest_denomination
? I18n.t('competitions.competition_info.entry_fee_is', {
base_entry_fee: formatMoney(competition.base_entry_fee),
base_entry_fee: formatMoney(competition.base_entry_fee_lowest_denomination),
})
: I18n.t('competitions.competition_info.no_entry_fee')}
</p>
Expand All @@ -107,18 +107,14 @@ export default function RegistrationRequirements({ competition, userInfo, showLi
)}

{competition['using_payment_integrations?'] && (
<p
dangerouslySetInnerHTML={{
__html: I18n.t(
showLinksToRegisterPage
? 'competitions.competition_info.use_stripe_link_html'
: 'competitions.competition_info.use_stripe_below_html',
{
here: `<a href='/competitions/${competition.id}/register'>${t(
'common.here',
)}</a>`,
},
),
<I18nHTMLTranslate
i18nKey={showLinksToRegisterPage
? 'competitions.competition_info.use_stripe_link_html'
: 'competitions.competition_info.use_stripe_below_html'}
options={{
here: `<a href='/competitions/${competition.id}/register'>${I18n.t(
'common.here',
)}</a>`,
}}
/>
)}
Expand Down

0 comments on commit 24a06fe

Please sign in to comment.