Skip to content

Commit

Permalink
Add Messaging If User Already Assigned to a Judging Table
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffhumphrey committed Oct 15, 2024
1 parent 68a7e85 commit b0fee14
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
1 change: 1 addition & 0 deletions lang/cs/cs-CZ.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,7 @@
$brewer_info_017 = "<p>Zdá se, že jste se zaregistrovali jako asistent, ale neuvedli jste, že jste k dispozici pro jakoukoli hodnotící relaci.</p><p>Vyberte prosím níže uvedené tlačítko pro úpravu vašeho účtu a poté vyberte \"Ano\" pro každou z relací, pro které jste dostupní jako asistent v sekci Dostupnost Relací Asistenta.</p><p>Pokud nejste k dispozici pro žádnou relaci, vyberte prosím \"Ne\" v sekci Hodnocení.</p>";
$brewer_info_018 = "<strong>Uvedli jste, že jste ochotni sloužit jako porotce, ale neuvedli jste, že jste k dispozici pro jakoukoli uvedenou hodnotící relaci.</strong> Prosím, upravte informace o svém účtu a vyberte \"Ano\" pro jednu nebo více hodnotících relací.";
$brewer_info_019 = "<strong>Uvedli jste, že jste ochotni sloužit jako asistent, ale neuvedli jste, že jste k dispozici pro jakoukoli uvedenou asistentskou relaci.</strong> Prosím, upravte informace o svém účtu a vyberte \"Ano\" pro jednu nebo více asistentských relací.";
$brewer_info_020 = "<strong>Již jste byli přiděleni ke stolu jako rozhodčí nebo steward.</strong> Pokud si přejete změnit svou dostupnost, kontaktujte prosím organizátora soutěže nebo koordinátora rozhodčích.";

/**
* ----------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions lang/en/en-US.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,7 @@
$brewer_text_044 = "Do you wish to change your security question and/or answer?";
$brewer_text_045 = "No results have been recorded.";
$brewer_text_046 = "For free-form club name entry, some symbols are not allowed, including ampersand (&amp;), single-quotation marks (&#39;), double-quotation marks (&quot;), and percent (&#37;).";
$brewer_text_047 = "If you are not available for any of the sessions listed below, but still can serve as as staff member in another capacity, keep \"Yes\" selected above.";
$brewer_text_047 = "If you are not available for any of the sessions listed when you select \"Yes\" above, but still are able to serve as as staff member in another capacity, please keep \"Yes\" as your response.";
$brewer_text_048 = "Shipping Entries";
$brewer_text_049 = "Select \"Not Applicable\" if you don't plan to submit any entries into the competition at this time.";
$brewer_text_050 = "Select \"Shipping Entries\" if you plan to box up and send your entries to the provided Shipping Location.";
Expand Down Expand Up @@ -2103,7 +2103,7 @@
$brewer_info_017 = "<p>It appears that you've signed up to serve as a steward, but have not indicated that you are available for any judging session.</p><p>Please select the button below to edit your account and then select \"Yes\" for each of the sessions you are available to serve as a steward in the Stewarding Session Availability section.</p><p>If you are not available for any session, please select \"No\" in the Judging section.</p>";
$brewer_info_018 = "<strong>You have indicated that you are willing to serve as a judge but have not indicated that you are available for any listed judging session.</strong> Please edit your account info and select \"Yes\" to one or more judging sessions.";
$brewer_info_019 = "<strong>You have indicated that you are willing to serve as a steward but have not indicated that you are available for any listed stewarding session.</strong> Please edit your account info and select \"Yes\" to one or more stewarding sessions.";

$brewer_info_020 = "<strong>You have already been assigned to a table as a judge or steward</strong>. If you wish to change your availability, please contact the competition organizer or judge coordinator.";

/**
* ----------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lang/es/es-419.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -2123,6 +2123,7 @@
$brewer_info_017 = "<p>Parece que te has registrado para servir como asistente, pero no has indicado que estás disponible para ninguna sesión de evaluación.</p><p>Por favor, selecciona el botón a continuación para editar tu cuenta y luego selecciona \"\" para cada una de las sesiones en las que estés disponible como asistente en la sección de Disponibilidad de Sesiones de Asistencia.</p><p>Si no estás disponible para ninguna sesión, selecciona \"No\" en la sección de Evaluación.</p>";
$brewer_info_018 = "<strong>Has indicado que estás dispuesto a servir como juez, pero no has indicado que estés disponible para ninguna sesión de evaluación listada.</strong> Por favor, edita la información de tu cuenta y selecciona \"\" para una o más sesiones de evaluación.";
$brewer_info_019 = "<strong>Has indicado que estás dispuesto a servir como asistente, pero no has indicado que estés disponible para ninguna sesión de asistencia listada.</strong> Por favor, edita la información de tu cuenta y selecciona \"\" para una o más sesiones de asistencia.";
$brewer_info_020 = "<strong>Ya se le ha asignado una mesa como juez o comisario.</strong> Si desea cambiar su disponibilidad, póngase en contacto con el organizador de la competición o con el coordinador de jueces.";

/**
* ----------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion lang/fr/fr-FR.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@
$brewer_info_017 = "<p>Il semble que vous vous soyez inscrit pour servir comme assistant, mais vous n'avez pas indiqué que vous êtes disponible pour une quelconque session de jugement.</p><p>Veuillez sélectionner le bouton ci-dessous pour modifier votre compte, puis sélectionner \"Oui\" pour chacune des sessions auxquelles vous êtes disponible comme assistant dans la section Disponibilité des Sessions d'Assistance.</p><p>Si vous n'êtes disponible pour aucune session, veuillez sélectionner \"Non\" dans la section Jugement.</p>";
$brewer_info_018 = "<strong>Vous avez indiqué que vous êtes prêt à servir comme juge, mais vous n'avez pas indiqué que vous êtes disponible pour une session de jugement répertoriée.</strong> Veuillez modifier les informations de votre compte et sélectionner \"Oui\" pour une ou plusieurs sessions de jugement.";
$brewer_info_019 = "<strong>Vous avez indiqué que vous êtes prêt à servir comme assistant, mais vous n'avez pas indiqué que vous êtes disponible pour une session d'assistance répertoriée.</strong> Veuillez modifier les informations de votre compte et sélectionner \"Oui\" pour une ou plusieurs sessions d'assistance.";

$brewer_info_020 = "<strong>Vous avez déjà été assigné à une table en tant que juge ou steward.</strong> Si vous souhaitez modifier votre disponibilité, veuillez contacter l'organisateur de la compétition ou le coordinateur des juges.";

/**
* ----------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions lang/pt/pt-BR.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,7 @@
$brewer_info_017 = "<p>Parece que você se inscreveu para servir como assistente, mas não indicou que está disponível para nenhuma sessão de julgamento.</p><p>Por favor, selecione o botão abaixo para editar sua conta e, em seguida, selecione \"Sim\" para cada uma das sessões em que você estiver disponível como assistente na seção de Disponibilidade de Sessões de Assistência.</p><p>Se você não estiver disponível para nenhuma sessão, selecione \"Não\" na seção de Julgamento.</p>";
$brewer_info_018 = "<strong>Você indicou que está disposto a servir como juiz, mas não indicou que está disponível para nenhuma sessão de julgamento listada.</strong> Por favor, edite as informações da sua conta e selecione \"Sim\" para uma ou mais sessões de julgamento.";
$brewer_info_019 = "<strong>Você indicou que está disposto a servir como assistente, mas não indicou que está disponível para nenhuma sessão de assistência listada.</strong> Por favor, edite as informações da sua conta e selecione \"Sim\" para uma ou mais sessões de assistência.";
$brewer_info_020 = "<strong>Você já foi designado para uma mesa como juiz ou steward.</strong> Se desejar alterar sua disponibilidade, entre em contato com o organizador da competição ou com o coordenador de juízes.";

/**
* ----------------------------------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions sections/brewer.sec.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
$table_assign_steward = table_assignments($_SESSION['user_id'],"S",$_SESSION['prefsTimeZone'],$_SESSION['prefsDateFormat'],$_SESSION['prefsTimeFormat'],0);
}

if ((!empty($table_assign_judge)) || (!empty($table_assign_steward))) $table_assignment = TRUE;
if ((empty($table_assign_judge)) && (empty($table_assign_steward))) $table_assignment = FALSE;
// If a the user is already assigned to a table, do not show the judge or steward availability fields
$table_assignment = FALSE;
if (($_SESSION['jPrefsTablePlanning'] == 0) && ((!empty($table_assign_judge)) || (!empty($table_assign_steward)))) $table_assignment = TRUE;

if ($_SESSION['prefsProEdition'] == 1) {

Expand Down Expand Up @@ -240,7 +241,7 @@
$staff_avail_option .= sprintf("<option value=\"Y-%s\"%s>%s</option>",$row_judging3['id'],$location_yes,$label_yes);
$staff_avail_option .= "</select>";

if ((time() < $row_judging3['judgingDate']) || (($go == "admin") && ($filter != "default"))) {
if ((time() < $row_judging3['judgingDate']) || (($go == "admin") && ($filter != "default"))) {
$staff_location_avail .= $staff_avail_info;
$staff_location_avail .= $staff_avail_option;
}
Expand Down
27 changes: 15 additions & 12 deletions sections/brewer_form_2.sec.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?php

/*
// Redirect if directly accessed without authenticated session
if ((!isset($_SESSION['loginUsername'])) || ((isset($_SESSION['loginUsername'])) && (!isset($base_url)))) {
$redirect = "../../403.php";
$redirect_go_to = sprintf("Location: %s", $redirect);
header($redirect_go_to);
exit();
}
*/

if ($_SESSION['prefsProEdition'] == 1) $participant_orgs_label = $label_industry_affiliations;
else $participant_orgs_label = $label_brewing_partners;

$show_partners_orgs = FALSE;

// User is already assigned to a table. Contact organizer.
if (($table_assignment) && ($go == "account") && (!$entrant_type_brewery)) { ?>

<div class="form-group">
<label for="brewerJudge" class="col-lg-3 col-md-3 col-sm-4 col-xs-12 control-label"><?php echo $label_judging."/".$label_stewarding; ?></label>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
<div class="input-group">
<div class="alert alert-warning"><?php echo $brewer_info_020; ?></div>
</div>
</div>
</div>

<?php }

if (((!$table_assignment) || ($go == "admin")) && (!$entrant_type_brewery)) {

if ((!empty($judge_location_avail)) && (((!$judge_limit) && ($go == "account")) || (($_SESSION['userLevel'] <= 1) && (($go == "admin") || ($go == "account"))))) {
Expand Down Expand Up @@ -62,7 +65,7 @@
<div id="brewerJudgeFields">

<?php if (($totalRows_judging > 0) || (($go == "admin") && ($filter != "default"))) { ?>
<div class="form-group <?php if (($view == "all-availability") || ($view == "judging-availabilty")) echo "text-warning"; ?>">
<div class="form-group <?php if (($view == "all-availability") || ($view == "judging-availability")) echo "text-warning"; ?>">
<?php if (!empty($judge_location_avail)) { ?>
<label for="brewerJudgeLocation" class="col-lg-3 col-md-3 col-sm-4 col-xs-12 control-label"><?php echo $label_judging_avail; ?></label>
<div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
Expand Down

0 comments on commit b0fee14

Please sign in to comment.