/**
  * function getHTML
  * <pre>
  * This method returns the HTML data generated by this object.
  * </pre>
  * @return [STRING] HTML Display data.
  */
 function getHTML()
 {
     // Uncomment the following line if you want to create a template
     // tailored for this page:
     //$path = $this->pathModuleRoot.'templates/';
     // Otherwise use the standard Templates for the site:
     $path = SITE_PATH_TEMPLATES;
     /*
      * store the link values
      */
     // example:
     // $this->linkValues[ 'view' ] = 'add/new/href/data/here';
     // store the link labels
     $this->linkLabels['edit'] = $this->labels->getLabel('[Edit]');
     $this->linkLabels['del'] = $this->labels->getLabel('[Delete]');
     $this->linkLabels['cont'] = $this->labels->getLabel('[Continue]');
     // $this->linkLabels[ 'view' ] = 'new link label here';
     /*
      * store any additional link Columns
      */
     // example:
     //$title = $this->labels->getLabel( '[title_groups]');
     //$columnLabel = $this->labels->getLabel( '[groups]');
     //$link = $this->linkValues[ 'groups' ];
     //$fieldName = 'accessgroup_id';
     //$this->addLinkColumn( $title, $columnLabel, $link, $fieldName);
     /*
      * Update any label tags ...
      */
     // example:
     // $name = $user->getName();
     // $this->labels->setLabelTag( '[Title]', '[userName]', $name);
     // NOTE:  this parent method prepares the $this->template with the
     // common AdminBox data.
     $this->prepareTemplate($path);
     // store the statevar id to edit
     $this->template->set('editEntryID', $this->fields_id);
     // store all the fields to the template
     $this->setFormFieldsToTemplate();
     /*
      * Form related Template variables:
      */
     /*
      * Insert the date start/end values for the following date fields:
      */
     // example:
     //$this->template->set( 'startYear_[fieldName]', 2000);
     //$this->template->set( 'endYear_[fieldName]', 2010);
     /*
      * List related Template variables :
      */
     // Store the XML Node name for the Data Access Field List
     $xmlNodeName = RowManager_FieldManager::XML_NODE_NAME;
     $this->template->set('rowManagerXMLNodeName', $xmlNodeName);
     // store the primary key field name for the data being displayed
     $this->template->set('primaryKeyFieldName', 'fields_id');
     // store data list to the template
     // NOTE: we initialize it here to make sure we capture any new data
     // from a recent processData() call.
     $dataAccessManager = new RowManager_FieldManager();
     $dataAccessManager->setEventID($this->event_id);
     $dataAccessManager->setSortOrder($this->sortBy);
     //        $this->dataList = new FieldList( $this->sortBy );
     $this->dataList = $dataAccessManager->getListIterator();
     $this->template->setXML('dataList', $this->dataList->getXML());
     /*
      * Add any additional data required by the template here
      */
     // get a list of all field type IDs
     $fieldtype = new RowManager_FieldTypeManager();
     $fieldtype->setSortOrder('fieldtype_id');
     $fieldtypeList = new ListIterator($fieldtype);
     $fieldtypeArray = $fieldtypeList->getDropListArray();
     $this->template->set('list_fieldtype_id', $fieldtypeArray);
     // get a list of all data types; DB table = reg_cim_datatypes
     $type = new RowManager_DataTypeManager();
     $type->setSortOrder('datatypes_id');
     $typeList = new ListIterator($type);
     $typeArray = $typeList->getDropListArray();
     $this->template->set('list_datatypes_id', $typeArray);
     //TODO: replace this with a reference to a multi_lingual label constant array...
     $boolArray = array();
     $boolArray['0'] = 'false';
     $boolArray['1'] = 'true';
     $this->template->set('list_fields_hidden', $boolArray);
     $this->template->set('list_fields_reqd', $boolArray);
     // get a list of all field priorities  (for some possible future use; for ease, requires priority DB table)
     /*        $priority = new RowManager_FieldManager();
             $priority->setSortOrder( 'fields_priority' );
             $priorityList = new ListIterator($priority);	
             $priorityArray = $priorityList->getDropListArray();
     
             $this->template->set( 'list_fields_priority', $priorityArray );   
      */
     $templateName = 'siteFormDataList.php';
     // if you are creating a custom template for this page then
     // replace $templateName with the following:
     //$templateName = 'page_EditFormFields.php';
     return $this->template->fetch($templateName);
 }
Example #2
0
  * fields_invalid [STRING]  Specifies invalid data not allowed in the form field.
  * fields_hidden [INTEGER]  Whether or not the form field is hidden to registrants (but not to admins).
  */
 $Field = new RowManager_FieldManager();
 $Field->dropTable();
 $Field->createTable();
 /*
  * DataType Table
  *
  * Stores some data type used for form fields, etc. Example: Number
  *
  * datatypes_id [INTEGER]  A unique identifier for the data type
  * datatypes_key [STRING]  A unique abbreviation for the data type (i.e. 'N' for 'Number')
  * datatypes_desc [STRING]  A description of the data type.
  */
 $DataType = new RowManager_DataTypeManager();
 $DataType->dropTable();
 $DataType->createTable();
 /*
  * PriceRule Table
  *
  * A pricing rule (i.e. frosh discount) for a particular event.
  *
  * pricerules_id [INTEGER]  Unique identifier for this pricing rule
  * event_id [INTEGER]  Event identifier used to identify event associated with the pricing rule.
  * priceruletypes_id [INTEGER]  Identifies the price rule type of the particular rule
  * pricerules_desc [STRING]  Description of the pricing rule
  * fields_id [INTEGER]  If not zero, refers to a form field identifier that affects the price for the event.
  * pricerules_value [STRING]  A value that is used to determine when the price rule is applied (i.e. a date or a volume total, etc.)
  * pricerules_discount [INTEGER]  The actual discount to be applied to the price based on this price rule.
  */