x
x
x
x
Only portrait mode is currently supported - please rotate your device.
...
ConfiForms Form Definition | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<!--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--> <!--Update currentName from currentName on existing entry→ <!--Update the organizer image if changed--> <!--Set current attachment name on new entry--> <!--Update fields upon edit--> <!--Redirect on update--> <!-- Create group when event is created send analytics Event--> <!–TODO - Set page name from title→ <!–Create new page--> <!--Redirect new entry--> <!–Update entry with created page url--> <!-- Copy Organizer image to attachments bank --> <!–Update entry with created page update url--> <!--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, AWS EdStart Team |
...
HTML |
---|
<script> function getQueryVariableFromUrl(variable){ var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if(pair[0] == variable){return pair[1];} } return(false); } var entry_id = getQueryVariableFromUrl('entry_id'); var startDate; var startDateLocalTime = ''; var startDateFixed = ''; var endDate; var endDateLocalTime = ''; var endDateFixed = ''; const getTimeStamps = async (entry_id) => { let eventData = await jQuery.ajax({ url: '/ajax/confiforms/rest/filter.action?pageId=4633414546334144&f=createEvent&q=id:' + entry_id, type: "get", dataType: 'json', async: true }).then(res => res); return eventData; } const formatDates = async (startDateLocalTime, endDateLocalTime) => { for (var month in calendar) { if (startDateLocalTime.includes(month)) { console.log("about to do start Date Fixed") startDateFixed = `${startDateLocalTime.replace(month, calendar[month])} ${new Date().toString().match(/([-\+][0-9]+)\s/)[1]}`; console.log("did start Date Fixed") } if (endDateLocalTime.includes(month)) { console.log("about to do end Date Fixed") endDateFixed = `${endDateLocalTime.replace(month, calendar[month])} ${new Date().toString().match(/([-\+][0-9]+)\s/)[1]}`; console.log("did end Date Fixed") } } } async function formatDateLong2(d) { const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; const dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; var hh = d.getHours(); var m = d.getMinutes(); var s = d.getSeconds(); var dd = "am"; var h = hh; if (h >= 12) { h = hh-12; dd = "pm"; } if (h == 0) { h = 12; } m = m<10?"0"+m:m; s = s<10?"0"+s:s; var strTime = h+":"+m+" "+dd return dayNames[d.getDay()] + ", " + monthNames[d.getMonth()] + " " + d.getDate() + " " + d.getFullYear() + ", " + strTime; } $("#i_startDateTimestamp").waitUntilExists(() => { getTimeStamps(entry_id).then((data) => { startDate = new Date(data.list.entry[0].fields.startDate); endDate = new Date(data.list.entry[0].fields.endDate); formatDateLong2(startDate).then((startDateFormatted) => { startDateLocalTime = startDateFormatted; formatDateLong2(endDate).then((endDateFormatted) => { endDateLocalTime = endDateFormatted; formatDates(startDateLocalTime, endDateLocalTime).then(() => { $("#i_startDate").val(startDateFixed); $("#i_endDate").val(endDateFixed); }) }) }) }) }) </script> |
...
OneValley