コード例 #1
0
ファイル: EventEditor.php プロジェクト: kurtkk/seminars
 /**
  * Creates the HTML output.
  *
  * @return string HTML of the create/edit form
  */
 public function render()
 {
     $this->setFormConfiguration((array) $this->conf['form.']['eventEditor.']);
     $this->declareDataHandler();
     $this->storeAttachedFiles();
     /** @var tx_oelib_Template $template */
     $template = t3lib_div::makeInstance('tx_oelib_Template');
     $template->processTemplate(parent::render());
     $template->hideSubpartsArray($this->getHiddenSubparts(), self::SUBPART_PREFIX);
     $this->setRequiredFieldLabels($template);
     // The redirect to the FE editor with the current record loaded can
     // only work with the record's UID, but new records do not have a UID
     // before they are saved.
     if ($this->getObjectUid() == 0) {
         $template->hideSubparts('submit_and_stay');
     }
     return $this->getHtmlWithAttachedFilesList($template);
 }
コード例 #2
0
 /**
  * Creates the HTML output.
  *
  * @return string HTML of the create/edit form
  */
 public function render()
 {
     $rawForm = parent::render();
     // For the confirmation page, we need to reload the whole thing. Yet,
     // the previous rendering still is necessary for processing the data.
     if ($this->currentPageNumber > 0) {
         $this->discardRenderedForm();
         $this->setFormConfiguration();
         // This will produce a new form to which no data can be provided.
         $rawForm = $this->makeFormCreator()->render();
     }
     // Remove empty label tags that have been created due to a bug in FORMidable.
     $rawForm = preg_replace('/<label[^>]*><\\/label>/', '', $rawForm);
     $this->processTemplate($rawForm);
     $this->setLabels();
     $this->hideUnusedFormFields();
     if (!$this->getConfValueBoolean('createAdditionalAttendeesAsFrontEndUsers', 's_registration')) {
         $this->hideSubparts('attendees_position_and_email');
     }
     $this->setMarker('feuser_data', $this->getAllFeUserData());
     $this->setMarker('billing_address', $this->getBillingAddress());
     $this->setMarker('registration_data', $this->getAllRegistrationDataForConfirmation());
     return $this->getSubpart('', 2);
 }