Tribes now selectable on signup

This commit is contained in:
Thomas Günther 2024-06-01 11:16:07 +02:00
parent c1d83d5536
commit 92af6f6cd7
4 changed files with 12 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<?php
function _kompass_print_datebox($settingName, $settingValue, $style = '') {
echo '<input style="' . $style . '" type="date" name="' . $settingName . '" value="' . $settingValue. '" />';
echo '<input required style="' . $style . '" type="date" name="' . $settingName . '" value="' . $settingValue. '" />';
if (defined('WP_DEBUG') && WP_DEBUG == true) {
echo '<br />' . $settingName;
}

View File

@ -1,9 +1,9 @@
<?php
function _kompass_print_textbox($settingName, $settingValue, $style = '', $appendix = '', $lines = 1, $data_type = 'text') {
if (1 === $lines) {
echo '<input style="' . $style . '" type="' . $data_type . '" name="' . $settingName . '" value="' . $settingValue . '" />';
echo '<input required style="' . $style . '" type="' . $data_type . '" name="' . $settingName . '" value="' . $settingValue . '" />';
} else {
echo '<textarea style="' . $style . '" name="' . $settingName . '" rows=' . $lines . '>' . $settingValue . '</textarea>';
echo '<textarea required style="' . $style . '" name="' . $settingName . '" rows=' . $lines . '>' . $settingValue . '</textarea>';
}
if (null !== $appendix) {
echo '&nbsp;' . $appendix;

View File

@ -18,11 +18,7 @@
<td>Stamm / ABG:</td>
<td>
<select name="stamm" required placeholder="Bitte wählen">
<option value="ANC">Ancalagon</option>
<option value="BAN">Bankiva</option>
<option value="FEU">Feuerland</option>
<option value="LEO">LEO</option>
<option value="WM">Wilde Möhre</option>
{{beteiligte_gruppen}}
</select>
</td>
</tr>

View File

@ -62,11 +62,19 @@ function registrationForm(int $eventId, string $targetPage) : string
$registerForm
);
$tribes_array = unserialize($event->contributing_tribes);
$tribes = '';
foreach ($tribes_array as $tribe) {
$tribes .= '<option value="' . $tribe . '">' . $tribe . '</option>';
}
$registerForm = str_replace('{{startdate}}', $event->startdatum, $registerForm);
$registerForm = str_replace('{{enddate}}', $event->enddatum, $registerForm);
$registerForm = str_replace('{{amount_reduced}}', $event->amount_reduced, $registerForm);
$registerForm = str_replace('{{amount_default}}', $event->amount_default, $registerForm);
$registerForm = str_replace('{{amount_social}}', $event->amount_social, $registerForm);
$registerForm = str_replace('{{beteiligte_gruppen}}', $tribes, $registerForm);
$registerForm = str_replace('{{URL}}', $targetPage, $registerForm);