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