Only portrait mode is currently supported - please rotate your device.
Page History
...
HTML |
---|
<script>
// REDIRECTS USER TO EVENT ONE ALREADY EXISTS FOR COUNTRY AND ROUND IN URL
var country_code_check = getQueryVariableFromUrl("cc").toUpperCase();
var round_check = getQueryVariableFromUrl("round").toUpperCase();
jQuery.ajax({
url:
"/ajax/confiforms/rest/filter.action?pageId=90603622&f=createEvent&q=country:"+country_code_check+"%20AND%20round:"+round_check,
headers: {
"X-Atlassian-Token": "nocheck",
"Content-type": "application/json",
},
type: "get",
dataType: "json",
success: function (data) {
if (data.list.entry.length) {
if (data.list.entry[0].fields.country === country_code_check && data.list.entry[0].fields.round === round_check) {
window.location.replace("/display/EV/" + data.list.entry[0].fields.name)
}
} else {
console.log("no event for this country/round")
}
},
error: function (err) {
console.log(err)
},
})
</script>
<script>
$(document).ready(function () {
/*
var country_code = getQueryVariableFromUrl("cc");
var does_cc = country_code.toUpperCase();
var does_round = getQueryVariableFromUrl("round").toUpperCase();
if (!does_cc.includes("notfound")) {
var roundName = round_obj[does_round];
var countryName = country_obj[does_cc]+" ";
var page_name = countryName + roundName;
$('#i_pageName').val(page_name);
$('select#i_country option[value="'+does_cc+'"]').prop('selected', 'selected').change();
$('select#i_round option[value="'+does_round+'"]').prop('selected', 'selected').change();
$('#i_countryCode').val(does_cc);
}
*/
})
</script>
<script>
console.log("first thing in no format");
var event_exists_group = "event-TEST";
var event_exists_group_arr = [event_exists_group];
// flags to check if event exists
var event_exists = false;
console.log(event_exists_group_arr, "HERE I AM");
// flag to check if event have been shown yet
var event_changed = false;
function addEventExistsGroup(event_exists_group) {
jQuery.ajax({
url: "/rest/scriptrunner/latest/custom/addGroup",
headers: {
"X-Atlassian-Token": "nocheck",
"Content-type": "application/json",
},
type: "POST",
dataType: "text",
data: JSON.stringify({
group: [event_exists_group],
}),
success: function (text) {
console.log("Response: " + text);
},
error: function (err) {
alert("Group has already been added");
},
});
}
function removeSemifinalExistsGroup(event_exists_group) {
jQuery.ajax({
url: "/rest/scriptrunner/latest/custom/removeGroup",
headers: {
"X-Atlassian-Token": "nocheck",
"Content-type": "application/json",
},
type: "POST",
dataType: "text",
data: JSON.stringify({
group: [event_exists_group],
}),
success: function (text) {
console.log("Response: " + text);
},
error: function (err) {
alert("Group has already been removed");
},
});
}
$("#createGroup").click(() => {
console.log("clicked add button");
addEventExistsGroup(event_exists_group);
});
$("#removeGroup").click(() => {
console.log("clicked remove button");
removeSemifinalExistsGroup(event_exists_group)
})
var getCohosts = () => {
var entry_id = getQueryVariableFromUrl('entry_id');
let entryResult = jQuery.ajax({
url: `/ajax/confiforms/rest/filter.action?pageId=90603622&f=createEvent&q=id:${entry_id}`,
type: "get",
dataType: 'json',
async: true
}).then(res => res);
return entryResult;
}
</script> |
ConfiForms (FormView) Registrations Control | ||||||
---|---|---|---|---|---|---|
| ||||||
...
HTML |
---|
<script> $(window).on('load', function(){ $("#uploadButton1").click(() => { $("#i_sponsorimage1").click(); }) $("#i_currentSponsorimage1").waitUntilExists(() => { setTimeout(function(){ console.log("Wait until exists starts"); var currentsp1 = $('#i_currentSponsorimage1').val(); console.log("CURRENT SP1 value", currentsp1); if(currentsp1 !== ""){ $( "#s1upload-insert" ).remove() console.log("CURRENT SPONSOR IS NOT EMPTY"); var d1 = document.getElementById('uploadButton1'); d1.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s1upload-insert">${currentsp1}</div>`); } }, 1200); }); $("#i_sponsorimage1").change(function(){ $( "#s1upload-insert" ).remove() var logo1 = document.getElementsByClassName("up-file")[2].value.split("\\").pop(); var d1 = document.getElementById('uploadButton1'); d1.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s1upload-insert">${logo1}</div>`); }); $("#uploadButton2").click(() => { $("#i_sponsorimage2").click(); }) $("#i_currentSponsorimage2").waitUntilExists(() => { setTimeout(function(){ var currentsp2 = $('#i_currentSponsorimage2').val(); console.log("currentsp2 value", currentsp2); if(currentsp2 !== ""){ $( "#s2upload-insert" ).remove() var d2 = document.getElementById('uploadButton2'); d2.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s2upload-insert">${currentsp2}</div>`); } }, 1200); }); $("#i_sponsorimage2").change(function(){ $( "#s2upload-insert" ).remove() var logo2 = document.getElementsByClassName("up-file")[3].value.split("\\").pop(); var d2 = document.getElementById('uploadButton2'); d2.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s2upload-insert">${logo2}</div>`); }); $("#uploadButton3").click(() => { $("#i_sponsorimage3").click(); }) $("#i_currentSponsorimage3").waitUntilExists(() => { setTimeout(function(){ var currentsp3 = $('#i_currentSponsorimage3').val(); console.log("currentsp3 value", currentsp3); if(currentsp3 !== ""){ $( "#s3upload-insert" ).remove() var d3 = document.getElementById('uploadButton3'); d3.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s3upload-insert">${currentsp3}</div>`); } }, 1200); }); $("#i_sponsorimage3").change(function(){ $( "#s3upload-insert" ).remove() var logo3 = document.getElementsByClassName("up-file")[4].value.split("\\").pop(); var d3 = document.getElementById('uploadButton3'); d3.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="s3upload-insert">${logo3}</div>`); }); $("#uploadButton4").click(() => { $("#i_imageOrganizer").click(); }) $("#i_currentImageOrganizer").waitUntilExists(() => { setTimeout(function(){ var currentimgorg = $('#i_currentImageOrganizer').val(); if(currentimgorg !== ""){ $( "#currentimgorg-insert" ).remove() var d4 = document.getElementById('uploadButton4'); d4.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="currentimgorg-insert">${currentimgorg}</div>`); } }, 1200); }); $("#i_imageOrganizer").change(function(){ $( "#currentimgorg-insert" ).remove() var logo4 = document.getElementsByClassName("up-file")[0].value.split("\\").pop(); var d4 = document.getElementById('uploadButton4'); d4.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="currentimgorg-insert">${logo4}</div>`); }); $("#uploadButton5").click(() => { $("#i_bannerImage").click(); }) $("#i_currentBannerImage").waitUntilExists(() => { setTimeout(function(){ var currentBannerImage = $('#i_currentBannerImage').val(); if(currentBannerImage !== ""){ $( "#currentBannerImage-insert" ).remove() var d5 = document.getElementById('uploadButton5'); d5.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="currentBannerImage-insert">${currentBannerImage}</div>`); } }, 1200); }); $("#i_bannerImage").change(function(){ $( "#currentBannerImage-insert" ).remove() var logo5 = document.getElementsByClassName("up-file")[1].value.split("\\").pop(); var d5 = document.getElementById('uploadButton5'); d5.insertAdjacentHTML('afterend', `<div class="file-upload-name" id="currentBannerImage-insert">${logo5}</div>`); }); }); </script> <script> function checkCohosts(){ var previousCohosts = ""; var eventName = ""; var entry_id = getQueryVariableFromUrl('entry_id'); jQuery.ajax({ url: `/ajax/confiforms/rest/filter.action?pageId=90603622&f=createEvent&q=id:${entry_id}`, type: "get", dataType: 'json', async: true, success: function checkCohosts(data) { var entries = getCohosts(); var console.log(data.list.entry[0].ownedBy); previousCohosts = entriesdata.list.entry[0].ownedBy; var eventName = entriesdata.list.entry[0].fields.name; } }) var currentCohosts = $("#i_cohosts").val(); var previousCohostsdiffCohosts = previousCohosts.splitlocaleCompare(","currentCohosts); var currentCohostsconst diff = (diffMe, diffBy) => currentCohostsdiffMe.split(",");(diffBy).join('') var diffCohostsdiffStr = previousCohosts.localeCompare(currentCohosts)""; console.log("currentCohosts", currentCohosts); console.log("previousCohostspreviousCohohosts", previousCohosts); console.log("diffCohosts", diffCohosts); if (diffCohosts === -1){ var differencediffStr = $diff(previousCohosts, currentCohosts).not(previousCohosts).get(); console.log("diffStr", diffStr); analytics.track("cohostsAdded", { "name": eventName, "cohosts": differencediffStr, }); } if (diffCohosts === 1){ var differencediffStr = $diff(previousCohosts).not(, currentCohosts).get(); console.log("diffStr", diffStr); analytics.track("cohostsAddedcohostsRemoved", { "name": eventName, "cohosts": differencediffStr, }); } } </script> |
ConfiForms Form Definition | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<!-- Page view count → <!–Missing countryCode validation→ <!-- --> <!--Load the current field values--> <!--Load the current field values (ADMIN)--> <!--Don't allow events in the past→ <!--Don't allow end date earlier than start date--> <!--Add cohosts to ownedBy list on new entry--> <!--Update cohosts to ownedBy list on existing entry--> <!--Set current attachment name on new entry--> <!--Update the banner image if changed--> <!--Update the organizer image if changed--> <!--Update the sponsor 1 image if changed--> <!--Update the sponsor 2 image if changed--> <!--Update the sponsor 3 image if changed--> <!--Update fields upon edit--> <!--Redirect new entry--> <!--Redirect on update--> <!-- Create group when event is created send analytics Event--> <!–Create new page--> <!--Send email to ESG@gsvlabs.com on page creation--> <!-- --> <!–Update entry with created page url--> <!–Update entry with created page update url--> <!-- Copy Banner Image to attachments bank --> <!-- Copy Organizer image to attachments bank --> <!--Copy Sponsor 1 image to attachments bank--> <!--Copy Sponsor 2 image to attachments bank--> <!--Copy Sponsor 3 image to attachments bank--> <!--Delete update entry reference--> <!--Send email to new co-hosts--> Hello, You receiving this message because you are listed as a cohost on the [entry.name] event. To view changes, edit, or publish the event, go <a href="[entry.createdPage.urlPath]">here</a>. Thank you, ESG 2020 Team |
...