Merge branch 'main' of https://gitea.dev.asthia.ch/hes/wp-cass
This commit is contained in:
commit
dec4529d50
|
|
@ -36,8 +36,8 @@ class CASS_View_Race_Edit
|
|||
//Create mode
|
||||
$race->setStart(date("Y-m-d H:i:s"));
|
||||
$race->setEnd(date("Y-m-d H:i:s"));
|
||||
$race->setSubscriptionStart(date("Y-m-d H:i:s"));
|
||||
$race->setSubscriptionEnd(date("Y-m-d H:i:s"));
|
||||
$race->setSubscriptionStart(null);
|
||||
|
||||
}
|
||||
|
||||
//Validating data
|
||||
|
|
@ -101,20 +101,6 @@ class CASS_View_Race_Edit
|
|||
$race->setEnd($_POST["end"]);
|
||||
}
|
||||
|
||||
if ($_POST["subscriptionStart"] == "") {
|
||||
// echo "<p>* le début des inscriptions est obligatoire</p>";
|
||||
$dataValidationSuccess = false;
|
||||
} else {
|
||||
$race->setSubscriptionStart($_POST["subscriptionStart"]);
|
||||
}
|
||||
|
||||
if ($_POST["subscriptionEnd"] == "") {
|
||||
// echo "<p>* la fin des inscriptions est obligatoire</p>";
|
||||
$dataValidationSuccess = false;
|
||||
} else {
|
||||
$race->setSubscriptionEnd($_POST["subscriptionEnd"]);
|
||||
}
|
||||
|
||||
if (intval($_POST["level"]) == 0) {
|
||||
// echo "<p>* le niveau est obligatoire</p>";
|
||||
$dataValidationSuccess = false;
|
||||
|
|
@ -174,8 +160,12 @@ class CASS_View_Race_Edit
|
|||
$race->setParticipantMax(intval($_POST["participantMax"]));
|
||||
$race->setIDWPUser_Deputy(intval($_POST["IDWPUser_Deputy"]));
|
||||
$race->setParticipantMin(intval($_POST["participantMin"]));
|
||||
$race->setParticipantMin(intval($_POST["participantMin"]));
|
||||
$race->setParticipantMin(intval($_POST["participantMin"]));
|
||||
$race->setSubscriptionStart($_POST["subscriptionStart"]);
|
||||
$race->setSubscriptionEnd($_POST["subscriptionEnd"]);
|
||||
|
||||
if ($dataValidationSuccess) {
|
||||
if ($dataValidationSuccess) {
|
||||
switch ($stateForm) {
|
||||
case 'create':
|
||||
$race->setDtCreation(date("Y-m-d H:i:s"));
|
||||
|
|
@ -430,15 +420,15 @@ class CASS_View_Race_Edit
|
|||
</div>
|
||||
<br />
|
||||
<div class="form-element">
|
||||
<label class="form-element">Début des inscriptions*</label>
|
||||
<input class="cass" type="datetime-local" name="subscriptionStart" required
|
||||
<label class="form-element">Début des inscriptions</label>
|
||||
<input class="cass" type="datetime-local" name="subscriptionStart"
|
||||
value="<?php echo date('Y-m-d\TH:i', strtotime($race->getSubscriptionStart())) ?>">
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-element">
|
||||
<label class="form-element">Fin des inscriptions*</label>
|
||||
<input class="cass" type="datetime-local" name="subscriptionEnd" required
|
||||
<label class="form-element">Fin des inscriptions</label>
|
||||
<input class="cass" type="datetime-local" name="subscriptionEnd"
|
||||
value="<?php echo date('Y-m-d\TH:i', strtotime($race->getSubscriptionEnd())) ?>">
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
|||
|
|
@ -149,8 +149,19 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
|
||||
let headerToolbarButtons;
|
||||
|
||||
let buttonText;
|
||||
|
||||
let isMobile = window.matchMedia("(pointer:coarse)").matches;
|
||||
|
||||
console.log(isMobile) ;
|
||||
|
||||
if (window.viewChangeVisible == "true") {
|
||||
headerToolbarButtons = "timeGridDay,timeGridWeek,dayGridMonth,multiMonthYear,listMonth";
|
||||
if(isMobile == true) {
|
||||
headerToolbarButtons="listMonth";
|
||||
window.initialView = "listMonth";
|
||||
}
|
||||
else {
|
||||
headerToolbarButtons = "timeGridDay,timeGridWeek,dayGridMonth,multiMonthYear,listMonth"; }
|
||||
} else {
|
||||
headerToolbarButtons = window.initialView;
|
||||
}
|
||||
|
|
@ -173,9 +184,13 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
multiMonthYear: 'Année',
|
||||
listMonth: 'Liste'
|
||||
},
|
||||
|
||||
|
||||
|
||||
titleFormat: isMobile ? {
|
||||
month: 'short',
|
||||
year: 'numeric'
|
||||
} : {
|
||||
month: 'long',
|
||||
year: 'numeric'
|
||||
},
|
||||
initialView: window.initialView,
|
||||
eventMouseEnter: function (event) {
|
||||
$(event.el).popover({
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user