diff --git a/config/config.default.php b/config/config.default.php index 89e424d9..19d56cc5 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -383,6 +383,9 @@ return [ '4XL' => '4XLarge Straight-Cut', ], + // T-shirt Size-Guide link + 'tshirt_link' => env('TSHIRT_LINK', null), + // Whether to show the current day of the event (-2, -1, 0, 1, 2…) in footer and on the dashboard. // The event start date has to be set for it to appear. 'enable_show_day_of_event' => false, diff --git a/resources/assets/themes/base.scss b/resources/assets/themes/base.scss index 5abf23ed..c9018032 100644 --- a/resources/assets/themes/base.scss +++ b/resources/assets/themes/base.scss @@ -23,6 +23,8 @@ $theme-colors: map-merge($theme-colors, $custom-colors); $form-label-font-weight: $font-weight-bold; +$choices-guttering: auto; + @import '~bootstrap/scss/utilities'; @import '~bootstrap/scss/root'; diff --git a/resources/lang/de_DE/default.po b/resources/lang/de_DE/default.po index 26f0c534..5d7eb575 100644 --- a/resources/lang/de_DE/default.po +++ b/resources/lang/de_DE/default.po @@ -1625,6 +1625,16 @@ msgstr "Dies kann jederzeit durch eine E-Mail an %1$s msgid "settings.profile.shirt_size" msgstr "T-Shirt-Größe" +msgid "settings.profile.shirt_size.hint" +msgstr "Ein straight-cut T-Shirt hat breite Schultern und einen fast quadratischen Körper. " +"Ein fitted-cut (tailliertes) T-Shirt hat eine geschwungene Seitennaht, die an der Taille schmaler " +"ist und einen größeren Brust- sowie Hüft-Umfang hat. " +"Normalerweise fallen fitted-cut (taillierte) T-Shirts kleiner aus als straight-cut T-Shirts in der gleichen Größe, " +"außerdem sind die Größen von Marke zu Marke unterscheiden." + +msgid "settings.profile.shirt.link" +msgstr "Mehr Informationen" + msgid "settings.profile.angeltypes.info" msgstr "Du kannst deine Engeltypen auf der Engeltypen-Seite verwalten." diff --git a/resources/lang/en_US/default.po b/resources/lang/en_US/default.po index 378317af..6ad9e303 100644 --- a/resources/lang/en_US/default.po +++ b/resources/lang/en_US/default.po @@ -344,6 +344,16 @@ msgstr "To withdraw your approval, send an e-mail to %1$s< msgid "settings.profile.shirt_size" msgstr "T-shirt size" +msgid "settings.profile.shirt_size.hint" +msgstr "A straight-cut shirt has wide shoulders and a body which is almost square. " +"A fitted-cut t-shirt has a curved side seam which comes in at the waist " +"and goes out at the upper and lower ends. " +"Normally fitted-cut shirts are smaller then same size straight-cut shirts, " +"and sizes differ between brands." + +msgid "settings.profile.shirt.link" +msgstr "More information" + msgid "settings.profile.angeltypes.info" msgstr "You can manage your Angeltypes on the Angeltypes page." diff --git a/resources/views/macros/form.twig b/resources/views/macros/form.twig index e577a2dc..581aa8d4 100644 --- a/resources/views/macros/form.twig +++ b/resources/views/macros/form.twig @@ -202,6 +202,15 @@ Renders a select element wrapped in a DIV with mb-3. {% endfor %} + {% if opt.form_text|default('') %} +
+ {% if opt.raw_form_text|default(false) %} + {{ opt.form_text|raw }} + {% else %} + {{ opt.form_text }} + {% endif %} +
+ {% endif %} {%- endmacro %} diff --git a/resources/views/pages/registration.twig b/resources/views/pages/registration.twig index bb59eb4b..cedd70cf 100644 --- a/resources/views/pages/registration.twig +++ b/resources/views/pages/registration.twig @@ -239,6 +239,14 @@ 'required': isTShirtSizeRequired, 'required_icon': isTShirtSizeRequired, 'selected': f.formData('tshirt_size', ''), + 'info': __('settings.profile.shirt_size.hint'), + 'raw_form_text': true, + 'form_text': (tShirtLink ? m.icon('info-circle') + ~ ' ' + ~ __('settings.profile.shirt.link')|e + ~ '' : ''), } ) }} diff --git a/resources/views/pages/settings/profile.twig b/resources/views/pages/settings/profile.twig index c1f26e7c..e7e33e1b 100644 --- a/resources/views/pages/settings/profile.twig +++ b/resources/views/pages/settings/profile.twig @@ -155,6 +155,14 @@ 'required_icon': isTShirtSizeRequired, 'default_option': __('form.select_placeholder'), 'disabled': user.state.got_shirt, + 'info': __('settings.profile.shirt_size.hint'), + 'raw_form_text': true, + 'form_text': (tShirtLink ? m.icon('info-circle') + ~ ' ' + ~ __('settings.profile.shirt.link')|e + ~ '' : ''), }) }} {% endif %} diff --git a/src/Controllers/RegistrationController.php b/src/Controllers/RegistrationController.php index 7c0df8b7..26178d38 100644 --- a/src/Controllers/RegistrationController.php +++ b/src/Controllers/RegistrationController.php @@ -91,6 +91,7 @@ class RegistrationController extends BaseController [ 'minPasswordLength' => $this->config->get('min_password_length'), 'tShirtSizes' => $this->config->get('tshirt_sizes'), + 'tShirtLink' => $this->config->get('tshirt_link'), 'angelTypes' => AngelType::whereHideRegister(false)->get(), 'preselectedAngelTypes' => $preselectedAngelTypes, 'buildUpStartDate' => $this->userFactory->determineBuildUpStartDate()->format('Y-m-d'), diff --git a/src/Controllers/SettingsController.php b/src/Controllers/SettingsController.php index a6eb93c4..a6fbc8e4 100644 --- a/src/Controllers/SettingsController.php +++ b/src/Controllers/SettingsController.php @@ -46,8 +46,9 @@ class SettingsController extends BaseController [ 'settings_menu' => $this->settingsMenu(), 'user' => $user, - 'goodie_tshirt' => $this->config->get('goodie_type') === GoodieType::Tshirt->value, 'goodie_enabled' => $this->config->get('goodie_type') !== GoodieType::None->value, + 'goodie_tshirt' => $this->config->get('goodie_type') === GoodieType::Tshirt->value, + 'tShirtLink' => $this->config->get('tshirt_link'), 'isPronounRequired' => $requiredFields['pronoun'], 'isFirstnameRequired' => $requiredFields['firstname'], 'isLastnameRequired' => $requiredFields['lastname'],