60 $form =
new AutoForm(
$event,
"POST",
"/action/calendar/event_edit?event_id=$event_id");
65 $form->required(
"title",
"start_date",
"end_date");
66 $form->hide(
"composite_class",
"event_invitation_id",
"allow_access",
"time_zone_id",
"owner_id");
70 if (!checkRole(
"admin"))
72 $form->hide(
"published");
75 if(!checkRole(
"admin"))
77 $form->hide(
"owner_id");
81 $form->ajaxSubmit(
"function(result) {editEventResult(result);}",
"function() {document.id('{$form->id}_error').set('text','Failed to communicate with server'); }");
92 $calendarSelect =
new RelatedItemSelectFieldRenderer(
$form,
"calendar_id",
"Calendar",
Calendar,
"ORDER BY name",
"{name}",
"calendar_id",
false,
false, 80);
98 $eventTypeList = array();
105 $eventTypeSelect =
new SelectFieldRenderer(
$form,
"event_type",
"Event Type", $eventTypeList);
109 $eventTypeSelect =
new SelectFieldRenderer(
$form,
"event_type",
"Event Type");
137 echo
$form->writeScript();
static usingFeature()
Uses the specified framework feature(s).
static using()
Import the datamodels, views and manifest for the specified component(s).
static end($message="")
Use this method to terminate execution of a script instead of using the php keywords exit() or die().
static addTaxonomyFieldRenderers($form, $showSelectAll=true, $group=null, $limitTo=null)
$method
Pull out a simple reference to the request method.
if(count($sites) > 1) $calendarSelect
if(!checkRole($calendar->writeAccess)) $form