var appConfig = getAppConfig(); var uiTheme = getUItheme(); var dateTimeDataformID = getEventDateTimeFormID(); var dtDataArray = ArrayNew(1); var retForm = ""; var formResultHTML = ""; var submitStatusHTML = " Submitting..."; var endTimeRequired = getEndTimeRequiredStatus(); var dateTimeDataPageID = 0; var dtID = arguments.dateTimeID; var calEventID = arguments.eventID; var cbAction = "edit"; // Has a valid dataPageID been passed in, if not leave dpID as 0 if ( IsNumeric(arguments.dataPageID) AND arguments.dataPageID GT 0 ) dateTimeDataPageID = arguments.dataPageID; // If a dataPageID was not passed in but we have a dateTimeID, get the datapageID by the records uniqueID if ( dateTimeDataPageID LTE 0 AND LEN(TRIM(dtID)) ) { // Get the CE data for the uuid dtDataArray = application.ptCalendar.dateTimeBuilderDAO.getDateTimeData(uuid=dtID); // Check that we have dtDataArray and set the dataPageID if ( ArrayLen(dtDataArray) ) dateTimeDataPageID = dtDataArray[1].pageid; } // Check if we have the UUID from arguments. if not, we are creating a new record, so make the UUID if ( dateTimeDataPageID LTE 0 AND LEN(TRIM(dtID)) EQ 0 ) { dateTimeDataPageID = 0; dtID = createUUID(); cbAction = "add"; } // Set the request.params values for the dateTimeID and the eventID request.params.dateTimeID = dtID; request.params.eventID = calEventID; application.ptCalendar.scripts.loadADFLightbox(force=1); application.ptCalendar.scripts.loadJQuery(); application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme); // Load the DateJS Plugin Headers application.ptCalendar.scripts.loadDateJS();
retForm = formHeader; retForm = retForm & application.ptCalendar.forms.renderAddEditForm( formID = dateTimeDataformID, dataPageId = dateTimeDataPageID, customizedFinalHtml=formResultHTML ); retForm = retForm & formFooter; return retForm;
var dateTimeDataformID = application.ptCalendar.getEventDateTimeFormID(); // Get the Date/Time data based on the UUID var dateTimeArray = application.ptCalendar.dateTimeBuilderDAO.getDateTimeData(uuid=arguments.dateTimeID); // Check that we have data if ( ArrayLen(dateTimeArray) ) dataPageID = dateTimeArray[1].pageid; else dataPageID = 0; // Call the FORMS delete function return application.ptCalendar.forms.renderDeleteForm( formID=dateTimeDataformID ,dataPageID=dataPageID ,title=arguments.title ,callback=arguments.callback ,cbIDlist=arguments.cbIDlist); // Call the FORMS delete function return application.ptCalendar.forms.renderDeleteForm( formID=arguments.formID, dataPageID=arguments.dataPageID, title=arguments.title, callback=arguments.callback, cbIDlist=arguments.cbIDlist);