merge
This commit is contained in:
commit
3d2e3e24f3
|
|
@ -9,7 +9,7 @@ class CASS_Config
|
||||||
public static function execute()
|
public static function execute()
|
||||||
{
|
{
|
||||||
//Configuration of plugin
|
//Configuration of plugin
|
||||||
define("PRODUCTION", true);
|
define("PRODUCTION", false);
|
||||||
define("DB_DROP_IF_UNINSTALL", false);
|
define("DB_DROP_IF_UNINSTALL", false);
|
||||||
|
|
||||||
//Recaptcha v2 key
|
//Recaptcha v2 key
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,7 @@ class CASS_View_Race_Edit
|
||||||
}
|
}
|
||||||
|
|
||||||
//Non obligatory fields
|
//Non obligatory fields
|
||||||
|
$race->setSubscriptionEnable($_POST["subscriptionEnable"] === "on" ? 1 : 0);
|
||||||
$race->setPlaceLatitude(doubleval($_POST["placeLatitude"]));
|
$race->setPlaceLatitude(doubleval($_POST["placeLatitude"]));
|
||||||
$race->setPlaceLongitude(doubleval($_POST["placeLongitude"]));
|
$race->setPlaceLongitude(doubleval($_POST["placeLongitude"]));
|
||||||
$race->setMeetingPlaceLongitude(doubleval($_POST["meetingPlaceLongitude"]));
|
$race->setMeetingPlaceLongitude(doubleval($_POST["meetingPlaceLongitude"]));
|
||||||
|
|
@ -411,6 +412,13 @@ class CASS_View_Race_Edit
|
||||||
<input class="cass" type="text" name="placeLongitude" value="<?php echo $race->getPlaceLongitude() ?>">
|
<input class="cass" type="text" name="placeLongitude" value="<?php echo $race->getPlaceLongitude() ?>">
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
<div class="form-element">
|
||||||
|
<label class="form-element">Inscription activée</label>
|
||||||
|
<input type="checkbox" id="subscriptionEnable" name="subscriptionEnable" <?php if ($race->getSubscriptionEnable() == 1) {
|
||||||
|
echo "checked";
|
||||||
|
} ?>>
|
||||||
|
</div>
|
||||||
|
<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"
|
<input class="cass" type="datetime-local" name="subscriptionStart"
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ class CASS_View_Race_List extends WP_List_Table
|
||||||
'IDWPUser_Deputy' => __('Adjoint', 'cass-race-deputy-content'),
|
'IDWPUser_Deputy' => __('Adjoint', 'cass-race-deputy-content'),
|
||||||
'start' => __('Début', 'cass-race-start-content'),
|
'start' => __('Début', 'cass-race-start-content'),
|
||||||
'end' => __('Fin', 'cass-race-end-content'),
|
'end' => __('Fin', 'cass-race-end-content'),
|
||||||
|
'subscriptionEnable' => __('Ins. activée','cass-race-subscription-enable-content'),
|
||||||
'subscriptionStart' => __('Ins. début', 'cass-race-start-content'),
|
'subscriptionStart' => __('Ins. début', 'cass-race-start-content'),
|
||||||
'subscriptionEnd' => __('Ins. fin', 'cass-race-end-content'),
|
'subscriptionEnd' => __('Ins. fin', 'cass-race-end-content'),
|
||||||
'subscriptionCount' => __('Nbre inscrit', 'cass-race-count-subscribed-content'),
|
'subscriptionCount' => __('Nbre inscrit', 'cass-race-count-subscribed-content'),
|
||||||
|
|
@ -338,6 +339,9 @@ class CASS_View_Race_List extends WP_List_Table
|
||||||
|
|
||||||
case 'comment':
|
case 'comment':
|
||||||
return ReadGlobal($item[$column_name]);
|
return ReadGlobal($item[$column_name]);
|
||||||
|
|
||||||
|
case 'subscriptionEnable':
|
||||||
|
return $item[$column_name] == 1 ? "Oui" : "Non";
|
||||||
default:
|
default:
|
||||||
return $item[$column_name];
|
return $item[$column_name];
|
||||||
}
|
}
|
||||||
|
|
@ -361,6 +365,7 @@ class CASS_View_Race_List extends WP_List_Table
|
||||||
'state' => array('state', false),
|
'state' => array('state', false),
|
||||||
'start' => array('start', false),
|
'start' => array('start', false),
|
||||||
'end' => array('end', false),
|
'end' => array('end', false),
|
||||||
|
'subscriptionEnable' => array('subscriptionEnable', false),
|
||||||
'subscriptionStart' => array('subscriptionStart', false),
|
'subscriptionStart' => array('subscriptionStart', false),
|
||||||
'subscriptionEnd' => array('subscriptionEnd', false),
|
'subscriptionEnd' => array('subscriptionEnd', false),
|
||||||
'IDLevel' => array('IDLevel', false),
|
'IDLevel' => array('IDLevel', false),
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ class Race
|
||||||
private $placeLongitude;
|
private $placeLongitude;
|
||||||
private $start;
|
private $start;
|
||||||
private $end;
|
private $end;
|
||||||
|
private $subscriptionEnable;
|
||||||
private $subscriptionStart;
|
private $subscriptionStart;
|
||||||
private $subscriptionEnd;
|
private $subscriptionEnd;
|
||||||
private $IDLevel;
|
private $IDLevel;
|
||||||
|
|
@ -35,7 +36,7 @@ class Race
|
||||||
{
|
{
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT IDRace, name, dtCreation, dtEdition, state, IDWPUser_RL,IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionStart, subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason
|
SELECT IDRace, name, dtCreation, dtEdition, state, IDWPUser_RL,IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionEnable, subscriptionStart, subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason
|
||||||
FROM cass_race
|
FROM cass_race
|
||||||
WHERE IDRace = %d;
|
WHERE IDRace = %d;
|
||||||
";
|
";
|
||||||
|
|
@ -55,6 +56,7 @@ class Race
|
||||||
$this->setPlaceLongitude($result->placeLongitude);
|
$this->setPlaceLongitude($result->placeLongitude);
|
||||||
$this->setStart($result->start);
|
$this->setStart($result->start);
|
||||||
$this->setEnd($result->end);
|
$this->setEnd($result->end);
|
||||||
|
$this->setSubscriptionEnable($result->subscriptionEnable);
|
||||||
$this->setSubscriptionStart($result->subscriptionStart);
|
$this->setSubscriptionStart($result->subscriptionStart);
|
||||||
$this->setSubscriptionEnd($result->subscriptionEnd);
|
$this->setSubscriptionEnd($result->subscriptionEnd);
|
||||||
$this->setIDLevel($result->IDLevel);
|
$this->setIDLevel($result->IDLevel);
|
||||||
|
|
@ -83,7 +85,7 @@ class Race
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
UPDATE cass_race
|
UPDATE cass_race
|
||||||
SET name = %s, dtCreation = %s, dtEdition = %s, state = %d, IDWPUser_RL = %d, IDWPUser_Deputy = %d, placeName = %s, placeLocality = %s, placeLatitude = %s, placeLongitude = %s, start = %s, end = %s, subscriptionStart = %s, subscriptionEnd = %s, IDLevel = %d, meetingPlaceName = %s, meetingPlaceLongitude = %s, meetingPlaceLatitude = %s, participantMin = %d, participantMax = %d, descriptionPublic = %s, descriptionMemberSubscribed = %s, formType = %d, comment = %s, IDType = %d, IDGroup = %d, IDSeason = %d
|
SET name = %s, dtCreation = %s, dtEdition = %s, state = %d, IDWPUser_RL = %d, IDWPUser_Deputy = %d, placeName = %s, placeLocality = %s, placeLatitude = %s, placeLongitude = %s, start = %s, end = %s,subscriptionEnable = %d, subscriptionStart = %s, subscriptionEnd = %s, IDLevel = %d, meetingPlaceName = %s, meetingPlaceLongitude = %s, meetingPlaceLatitude = %s, participantMin = %d, participantMax = %d, descriptionPublic = %s, descriptionMemberSubscribed = %s, formType = %d, comment = %s, IDType = %d, IDGroup = %d, IDSeason = %d
|
||||||
WHERE IDRace = %d;
|
WHERE IDRace = %d;
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
@ -101,6 +103,7 @@ class Race
|
||||||
$this->getPlaceLongitude(),
|
$this->getPlaceLongitude(),
|
||||||
$this->getStart(),
|
$this->getStart(),
|
||||||
$this->getEnd(),
|
$this->getEnd(),
|
||||||
|
$this->getSubscriptionEnable(),
|
||||||
$this->getSubscriptionStart(),
|
$this->getSubscriptionStart(),
|
||||||
$this->getSubscriptionEnd(),
|
$this->getSubscriptionEnd(),
|
||||||
$this->getIDLevel(),
|
$this->getIDLevel(),
|
||||||
|
|
@ -139,8 +142,8 @@ class Race
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
INSERT INTO cass_race (name, dtCreation, dtEdition, state, IDWPUser_RL, IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionStart, subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason)
|
INSERT INTO cass_race (name, dtCreation, dtEdition, state, IDWPUser_RL, IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionEnable, subscriptionStart, subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason)
|
||||||
VALUES(%s, %s, %s, %d, %d, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %d, %d, %d, %s, %s, %d, %s, %d, %d, %d);
|
VALUES(%s, %s, %s, %d, %d, %d, %s, %s, %s, %s, %s, %s, %d, %s, %s, %s, %s, %d, %d, %d, %d, %s, %s, %d, %s, %d, %d, %d);
|
||||||
";
|
";
|
||||||
|
|
||||||
$wpdb->query($wpdb->prepare(
|
$wpdb->query($wpdb->prepare(
|
||||||
|
|
@ -157,6 +160,7 @@ class Race
|
||||||
$this->getPlaceLongitude(),
|
$this->getPlaceLongitude(),
|
||||||
$this->getStart(),
|
$this->getStart(),
|
||||||
$this->getEnd(),
|
$this->getEnd(),
|
||||||
|
$this->getSubscriptionEnable(),
|
||||||
$this->getSubscriptionStart(),
|
$this->getSubscriptionStart(),
|
||||||
$this->getSubscriptionEnd(),
|
$this->getSubscriptionEnd(),
|
||||||
$this->getIDLevel(),
|
$this->getIDLevel(),
|
||||||
|
|
@ -179,7 +183,7 @@ class Race
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT cass_race.IDRace, wp_users_rl.display_name AS nameRL, wp_users_deputy.display_name AS nameDeputy, GROUP_CONCAT(cass_material.name) AS materials, cass_race.name AS name, state, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionStart, subscriptionEnd, cass_race.IDLevel, meetingPlaceName, meetingPlaceLatitude, meetingPlaceLongitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, comment, cass_level.name AS level, cass_type.name AS type, cass_group.name AS 'group', cass_race.IDGroup, cass_season.name AS season FROM cass_race
|
SELECT cass_race.IDRace, wp_users_rl.display_name AS nameRL, wp_users_deputy.display_name AS nameDeputy, GROUP_CONCAT(cass_material.name) AS materials, cass_race.name AS name, state, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionEnable, subscriptionStart, subscriptionEnd, cass_race.IDLevel, meetingPlaceName, meetingPlaceLatitude, meetingPlaceLongitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, comment, cass_level.name AS level, cass_type.name AS type, cass_group.name AS 'group', cass_race.IDGroup, cass_season.name AS season FROM cass_race
|
||||||
INNER JOIN cass_level ON cass_level.IDLevel = cass_race.IDLevel
|
INNER JOIN cass_level ON cass_level.IDLevel = cass_race.IDLevel
|
||||||
INNER JOIN cass_group ON cass_group.IDGroup = cass_race.IDGroup
|
INNER JOIN cass_group ON cass_group.IDGroup = cass_race.IDGroup
|
||||||
INNER JOIN cass_type ON cass_type.IDType = cass_race.IDType
|
INNER JOIN cass_type ON cass_type.IDType = cass_race.IDType
|
||||||
|
|
@ -199,7 +203,7 @@ class Race
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT cass_race.IDRace, wp_users_rl.display_name AS nameRL, wp_users_deputy.display_name AS nameDeputy, GROUP_CONCAT(cass_material.name) AS materials, cass_race.name AS name, state, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionStart, subscriptionEnd, cass_race.IDLevel, meetingPlaceName, meetingPlaceLatitude, meetingPlaceLongitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, comment, cass_level.name AS level, cass_type.name AS type, cass_group.name AS 'group', cass_race.IDGroup, cass_season.name AS season FROM cass_race
|
SELECT cass_race.IDRace, wp_users_rl.display_name AS nameRL, wp_users_deputy.display_name AS nameDeputy, GROUP_CONCAT(cass_material.name) AS materials, cass_race.name AS name, state, placeName, placeLocality, placeLatitude, placeLongitude, start, end, subscriptionEnable, subscriptionStart, subscriptionEnd, cass_race.IDLevel, meetingPlaceName, meetingPlaceLatitude, meetingPlaceLongitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, comment, cass_level.name AS level, cass_type.name AS type, cass_group.name AS 'group', cass_race.IDGroup, cass_season.name AS season FROM cass_race
|
||||||
INNER JOIN cass_level ON cass_level.IDLevel = cass_race.IDLevel
|
INNER JOIN cass_level ON cass_level.IDLevel = cass_race.IDLevel
|
||||||
INNER JOIN cass_group ON cass_group.IDGroup = cass_race.IDGroup
|
INNER JOIN cass_group ON cass_group.IDGroup = cass_race.IDGroup
|
||||||
INNER JOIN cass_type ON cass_type.IDType = cass_race.IDType
|
INNER JOIN cass_type ON cass_type.IDType = cass_race.IDType
|
||||||
|
|
@ -222,7 +226,7 @@ class Race
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT IDRace, name, dtCreation, dtEdition, state, IDWPUser_RL, IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end,subscriptionStart,subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason
|
SELECT IDRace, name, dtCreation, dtEdition, state, IDWPUser_RL, IDWPUser_Deputy, placeName, placeLocality, placeLatitude, placeLongitude, start, end,subscriptionEnable, subscriptionStart,subscriptionEnd, IDLevel, meetingPlaceName, meetingPlaceLongitude, meetingPlaceLatitude, participantMin, participantMax, descriptionPublic, descriptionMemberSubscribed, formType, comment, IDType, IDGroup, IDSeason
|
||||||
FROM cass_race
|
FROM cass_race
|
||||||
WHERE IDRace = %d;
|
WHERE IDRace = %d;
|
||||||
";
|
";
|
||||||
|
|
@ -310,6 +314,11 @@ class Race
|
||||||
{
|
{
|
||||||
return $this->end;
|
return $this->end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSubscriptionEnable()
|
||||||
|
{
|
||||||
|
return $this->subscriptionEnable;
|
||||||
|
}
|
||||||
public function getSubscriptionStart()
|
public function getSubscriptionStart()
|
||||||
{
|
{
|
||||||
return $this->subscriptionStart;
|
return $this->subscriptionStart;
|
||||||
|
|
@ -450,6 +459,11 @@ class Race
|
||||||
$this->end = $end;
|
$this->end = $end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSubscriptionEnable($subscriptionEnable)
|
||||||
|
{
|
||||||
|
$this->subscriptionEnable = $subscriptionEnable;
|
||||||
|
}
|
||||||
|
|
||||||
public function setSubscriptionStart($subscriptionStart)
|
public function setSubscriptionStart($subscriptionStart)
|
||||||
{
|
{
|
||||||
$this->subscriptionStart = $subscriptionStart;
|
$this->subscriptionStart = $subscriptionStart;
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ function cass_database_initialize(){
|
||||||
placeLongitude VARCHAR(45) NULL,
|
placeLongitude VARCHAR(45) NULL,
|
||||||
start DATETIME NOT NULL,
|
start DATETIME NOT NULL,
|
||||||
end DATETIME NOT NULL,
|
end DATETIME NOT NULL,
|
||||||
|
subscriptionEnable BOOLEAN,
|
||||||
subscriptionStart DATETIME NOT NULL,
|
subscriptionStart DATETIME NOT NULL,
|
||||||
subscriptionEnd DATETIME NOT NULL,
|
subscriptionEnd DATETIME NOT NULL,
|
||||||
meetingPlaceName VARCHAR(100) NULL,
|
meetingPlaceName VARCHAR(100) NULL,
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@
|
||||||
function cass_database_update(){
|
function cass_database_update(){
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ALTER TABLE cass_race
|
ALTER TABLE cass_race ADD subscriptionEnable BOOLEAN;
|
||||||
ADD IDWPUser_Deputy INT NOT NULL;
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +257,16 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
document.getElementById("raceLeader").innerHTML = "La course est gérée (chef de course) par <b>" + ReadGlobal(race.nameRL, false) + "</b> " + ReadGlobal(deputyText, false) + "";
|
document.getElementById("raceLeader").innerHTML = "La course est gérée (chef de course) par <b>" + ReadGlobal(race.nameRL, false) + "</b> " + ReadGlobal(deputyText, false) + "";
|
||||||
document.getElementById("raceTypeLevel").innerHTML = "Le type est <b>" + ReadGlobal(race.type, false) + "</b> d'un niveau <b>" + ReadGlobal(race.level, false) + "</b>";
|
document.getElementById("raceTypeLevel").innerHTML = "Le type est <b>" + ReadGlobal(race.type, false) + "</b> d'un niveau <b>" + ReadGlobal(race.level, false) + "</b>";
|
||||||
document.getElementById("raceGroup").innerHTML = "Groupe : <b>" + ReadGlobal(race.group, false) + "</b>";
|
document.getElementById("raceGroup").innerHTML = "Groupe : <b>" + ReadGlobal(race.group, false) + "</b>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(parseInt(race.subscriptionEnable) == 1) {
|
||||||
|
|
||||||
document.getElementById("raceSubscriptionStartEnd").innerHTML = "Les inscriptions sont ouvertes du <b>" + getDateFormated(race.subscriptionStart) + " </b> au <b>" + getDateFormated(race.subscriptionEnd) + "</b>";
|
document.getElementById("raceSubscriptionStartEnd").innerHTML = "Les inscriptions sont ouvertes du <b>" + getDateFormated(race.subscriptionStart) + " </b> au <b>" + getDateFormated(race.subscriptionEnd) + "</b>";
|
||||||
|
} else {
|
||||||
|
document.getElementById("raceSubscriptionStartEnd").innerHTML = "Les inscriptions sont ouvertes du <b>" + getDateFormated(race.subscriptionStart) + " </b> au <b>" + getDateFormated(race.subscriptionEnd) + "</b> (actuellement fermées)";
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById("racePlaceLocality").innerHTML = "La course se déroulera à <b>"+ReadGlobal(race.placeName,false)+"</b> (<b>"+race.placeLocality+"</b>)";
|
document.getElementById("racePlaceLocality").innerHTML = "La course se déroulera à <b>"+ReadGlobal(race.placeName,false)+"</b> (<b>"+race.placeLocality+"</b>)";
|
||||||
document.getElementById("raceMeeting").innerHTML = "Le lieu de RDV est <b>" + race.meetingPlaceName + "</b>.";
|
document.getElementById("raceMeeting").innerHTML = "Le lieu de RDV est <b>" + race.meetingPlaceName + "</b>.";
|
||||||
document.getElementById("IDRace").value = race.IDRace;
|
document.getElementById("IDRace").value = race.IDRace;
|
||||||
|
|
@ -290,7 +299,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
var subscriptionEnd = race.subscriptionEnd.toLocaleString();
|
var subscriptionEnd = race.subscriptionEnd.toLocaleString();
|
||||||
|
|
||||||
// Contrôle état de la course
|
// Contrôle état de la course
|
||||||
if (race.state == 2 || race.state == 3) {
|
if ((race.state == 2 || race.state == 3) && parseInt(race.subscriptionEnable) == 1) {
|
||||||
|
|
||||||
// Contrôle ouverture des inscriptions
|
// Contrôle ouverture des inscriptions
|
||||||
var inscriptionElement = document.getElementById('inscription');
|
var inscriptionElement = document.getElementById('inscription');
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ function cass_shortcode_calendar_global($atts){
|
||||||
<!--Details course -->
|
<!--Details course -->
|
||||||
<div class='cass-box-center'>
|
<div class='cass-box-center'>
|
||||||
<div id='raceInfo' hidden>
|
<div id='raceInfo' hidden>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<h3 align='center' id='raceName'>Informations de la course</h3>
|
<h3 align='center' id='raceName'>Informations de la course</h3>
|
||||||
|
|
@ -144,9 +145,21 @@ function cass_shortcode_calendar_global($atts){
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
<h5>Administration</h5>
|
||||||
|
<a href='http://localhost/wordpress/wp-admin/admin.php?page=cass-admin-race-user-list&action=edit&IDRace=178' target='_blank'>
|
||||||
|
Liste des participants de la course
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
<button class='pure-button pure-button-primary' @click='loadInfoCourse()'>Information et gestion de la course</button>
|
<button class='pure-button pure-button-primary' @click='loadInfoCourse()'>Information et gestion de la course</button>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
|
||||||
// Contrôle état de la course
|
// Contrôle état de la course
|
||||||
|
|
||||||
|
if(parseInt(this.race.subscriptionEnable) == 1) {
|
||||||
raceSubscriptionStartEndMeetingPlaceParticipiant = 'Les inscriptions sont ouvertes du <b>' + getDateFormated(this.race.subscriptionStart) + ' </b> au <b>' + getDateFormated(this.race.subscriptionEnd) + '</b>.';
|
raceSubscriptionStartEndMeetingPlaceParticipiant = 'Les inscriptions sont ouvertes du <b>' + getDateFormated(this.race.subscriptionStart) + ' </b> au <b>' + getDateFormated(this.race.subscriptionEnd) + '</b>.';
|
||||||
|
} else {
|
||||||
|
raceSubscriptionStartEndMeetingPlaceParticipiant = 'Les inscriptions sont ouvertes du <b>' + getDateFormated(this.race.subscriptionStart) + ' </b> au <b>' + getDateFormated(this.race.subscriptionEnd) + '</b> (actuellement fermées).';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (this.race.participantMin !== null && this.race.participantMin !== "" && this.race.participantMin !== 0) {
|
if (this.race.participantMin !== null && this.race.participantMin !== "" && this.race.participantMin !== 0) {
|
||||||
raceSubscriptionStartEndMeetingPlaceParticipiant += "<br>Le nombre de participant minimum est de <b>" + this.race.participantMin + "</b>.";
|
raceSubscriptionStartEndMeetingPlaceParticipiant += "<br>Le nombre de participant minimum est de <b>" + this.race.participantMin + "</b>.";
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ function cass_shortcode_course_info()
|
||||||
} else if ($id == 0 || $race_user_state == 3 || $race_user_state == 4) {
|
} else if ($id == 0 || $race_user_state == 3 || $race_user_state == 4) {
|
||||||
if($race->getSubscriptionStart() > $today) {
|
if($race->getSubscriptionStart() > $today) {
|
||||||
$HTML.="<p>Les inscriptions pour cette course ne sont pas encore ouvertes.</p>";
|
$HTML.="<p>Les inscriptions pour cette course ne sont pas encore ouvertes.</p>";
|
||||||
} else if($race->getSubscriptionStart() <= $today && $race->getSubscriptionEnd() > $today){
|
} else if($race->getSubscriptionEnable == 1 && ($race->getSubscriptionStart() <= $today && $race->getSubscriptionEnd() > $today)){
|
||||||
$HTML.="<p>Les inscriptions pour cette course sont ouvertes.</p>
|
$HTML.="<p>Les inscriptions pour cette course sont ouvertes.</p>
|
||||||
<form action='".esc_attr( admin_url( 'admin-post.php' ) )."' method='post' class='pure-form pure-form-stacked'>
|
<form action='".esc_attr( admin_url( 'admin-post.php' ) )."' method='post' class='pure-form pure-form-stacked'>
|
||||||
<input type='hidden' name='action' value='course_info_inscription' />
|
<input type='hidden' name='action' value='course_info_inscription' />
|
||||||
|
|
@ -130,6 +130,8 @@ function cass_shortcode_course_info()
|
||||||
</form>";
|
</form>";
|
||||||
} else if($race->getSubscriptionStart() <= $today && $race->getSubscriptionEnd() <= $today){
|
} else if($race->getSubscriptionStart() <= $today && $race->getSubscriptionEnd() <= $today){
|
||||||
$HTML.="<p>Les inscriptions pour cette course sont fermées.</p>";
|
$HTML.="<p>Les inscriptions pour cette course sont fermées.</p>";
|
||||||
|
} else {
|
||||||
|
$HTML.="<p>Les inscriptions pour cette course ne sont pas encore ouvertes.</p>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ function cass_shortcode_member_register()
|
||||||
<input type='text' class='form-control' id='inputMemberNo' v-model='user.inputMemberNo' required placeholder='Votre numéro de membre'>
|
<input type='text' class='form-control' id='inputMemberNo' v-model='user.inputMemberNo' required placeholder='Votre numéro de membre'>
|
||||||
</div>
|
</div>
|
||||||
<div class='pure-control-group'>
|
<div class='pure-control-group'>
|
||||||
<label for='inputTelephone'>Téléphone</label>
|
<label for='inputTelephone'>Téléphone*</label>
|
||||||
<input type='text' class='form-control' id='inputTelephone' v-model='user.inputTelephone' required placeholder='Votre numéro de téléphone'>
|
<input type='text' class='form-control' id='inputTelephone' v-model='user.inputTelephone' required placeholder='Votre numéro de téléphone'>
|
||||||
</div>
|
</div>
|
||||||
<div class='pure-control-group'>
|
<div class='pure-control-group'>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user