Skip to content

Commit

Permalink
feat #8817: adding min and max value to the year (#8928)
Browse files Browse the repository at this point in the history
* feat #8817: adding min and max value to the year

* fix: displaying range in questionnaire creator overview
  • Loading branch information
Bekka592 authored Jul 5, 2023
1 parent 1701900 commit e887c9b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
2 changes: 0 additions & 2 deletions app/components/forms/orders/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
import { genders } from 'open-event-frontend/utils/dictionary/genders';
import { ageGroups } from 'open-event-frontend/utils/dictionary/age-groups';
import { countries } from 'open-event-frontend/utils/dictionary/demography';
import { years } from 'open-event-frontend/utils/dictionary/year-list';
import { languageForms1 } from 'open-event-frontend/utils/dictionary/language-form-1';
import { languageForms2 } from 'open-event-frontend/utils/dictionary/language-form-2';
import { homeWikis } from 'open-event-frontend/utils/dictionary/home-wikis';
Expand Down Expand Up @@ -651,7 +650,6 @@ export default Component.extend(FormMixin, {
genders : orderBy(genders, 'position'),
ageGroups : orderBy(ageGroups, 'position'),
countries : orderBy(countries, 'name'),
years : orderBy(years, 'year'),
languageForms1 : orderBy(languageForms1, 'position'),
languageForms2 : orderBy(languageForms2, 'position'),
homeWikis : orderBy(homeWikis, 'item'),
Expand Down
4 changes: 2 additions & 2 deletions app/components/forms/wizard/custom-form-input.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<div style="display: flex; flex-direction: column">
<div {{did-update this.updated @field}} class="ui action input main" style="width: inherit;">
{{#if (eq this.type "number")}}
{{#if (or (eq this.type "number") (eq this.type "year"))}}
<div style="width: 20%">
<Input type="text" placeholder={{t "Field Name"}} @value={{this.name}}/>
</div>
Expand All @@ -29,7 +29,7 @@
</div>
</UiDropdown>
{{/if}}
{{#if (eq this.type "number")}}
{{#if (or (eq this.type "number") (eq this.type "year"))}}
<div class="ui action input input-attendee-custom-form" style="width: 8%;">
<Input
@type="number"
Expand Down
2 changes: 1 addition & 1 deletion app/components/forms/wizard/custom-forms/table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</td>
{{#if (and this.complexColumn (eq @form 'attendee'))}}
<td class="border center aligned">
{{if (eq field.type "number") (concat field.min " - " field.max) "-"}}
{{if (or (eq field.type "number") (eq field.type "year")) (concat field.min " - " field.max) "-"}}
</td>
{{/if}}
<td class="border center aligned">
Expand Down
6 changes: 3 additions & 3 deletions app/templates/components/forms/orders/order-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@
<i class="dropdown icon"></i>
<div class="default text">{{t 'Select your year'}}</div>
<div class="menu">
{{#each this.years as |years|}}
<div class="item" data-value="{{@years.year}}">
{{years.year}}
{{#each (range field.min (add field.max 1)) as |year|}}
<div class="item" data-value="{{year}}">
{{year}}
</div>
{{/each}}
</div>
Expand Down
11 changes: 0 additions & 11 deletions app/utils/dictionary/year-list.ts

This file was deleted.

1 comment on commit e887c9b

@vercel
Copy link

@vercel vercel bot commented on e887c9b Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.