var appPath = getAppPath();
var appConfig = getAppConfig();
var uiTheme = getUItheme();
var dateTimeDataformID = getScheduleFormID();
var dtDataArray = ArrayNew(1);
var retForm = "";
var formResultHTML = "";
var submitStatusHTML = " Submitting...";
var dateTimeDataPageID = 0;
var dtID = arguments.dateTimeID;
var parentUUID = arguments.parentID;
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 = variables.scheduleBuilderDAO.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.parentID = parentUUID;
application.ptCourseCatalog.scripts.loadADFLightbox(force=1);
application.ptCourseCatalog.scripts.loadJQuery();
application.ptCourseCatalog.scripts.loadJQueryUI(themeName=uiTheme);
// Load the DateJS Plugin Headers
application.ptCourseCatalog.scripts.loadDateJS();
retForm = formHeader;
retForm = retForm & application.ptCourseCatalog.forms.renderAddEditForm(
formID = dateTimeDataformID,
dataPageId = dateTimeDataPageID,
customizedFinalHtml=formResultHTML
);
retForm = retForm & formFooter;
return retForm;
var dateTimeDataformID = application.ptCourseCatalog.getScheduleFormID();
// Get the Date/Time data based on the UUID
var dateTimeArray = variables.scheduleBuilderDAO.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.ptCourseCatalog.forms.renderDeleteForm(
formID=dateTimeDataformID
,dataPageID=dataPageID
,title=arguments.title
,callback=arguments.callback
,cbIDlist=arguments.cbIDlist);