/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { if (TL_MODE == 'BE') { $this->html = htmlspecialchars($this->html); } return parent::parse($arrAttributes); }
/** * Add the labels and messages. * * @param null $arrAttributes */ public function parse($arrAttributes = null) { // Messages (passed on to fineuploader JS) $basicTextOptions = array('text' => array('formatProgress', 'failUpload', 'waitingForResponse', 'paused'), 'messages' => array('typeError', 'sizeError', 'minSizeError', 'emptyError', 'noFilesError', 'tooManyItemsError', 'maxHeightImageError', 'maxWidthImageError', 'minHeightImageError', 'minWidthImageError', 'retryFailTooManyItems', 'onLeave', 'unsupportedBrowserIos8Safari'), 'retry' => array('autoRetryNote'), 'deleteFile' => array('confirmMessage', 'deletingStatusText', 'deletingFailedText'), 'paste' => array('namePromptMessage')); $config = array(); foreach ($basicTextOptions as $category => $messages) { foreach ($messages as $message) { // Only translate if available, otherwise fall back to default (EN) if (isset($GLOBALS['TL_LANG']['MSC']['fineuploader_trans'][$category][$message])) { $config[$category][$message] = $GLOBALS['TL_LANG']['MSC']['fineuploader_trans'][$category][$message]; } } } // BC (used to be a JSON string) if (isset($this->arrConfiguration['uploaderConfig']) && $this->arrConfiguration['uploaderConfig'] !== '') { $this->arrConfiguration['uploaderConfig'] = json_decode('{' . $this->arrConfiguration['uploaderConfig'] . '}', true); } // Merge with custom options $this->config = json_encode(array_merge($config, (array) $this->arrConfiguration['uploaderConfig'])); // Labels (in HTML) $labels = array('drop', 'upload', 'processing', 'cancel', 'retry', 'delete', 'close', 'yes', 'no'); $preparedLabels = array(); foreach ($labels as $label) { $preparedLabels[$label] = $GLOBALS['TL_LANG']['MSC']['fineuploader_' . $label]; } $this->labels = $preparedLabels; return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { // Return a wildcard in the back end if (TL_MODE == 'BE') { /** @var \BackendTemplate|object $objTemplate */ $objTemplate = new \BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### ' . $GLOBALS['TL_LANG']['FFL']['colStart'][0] . ' ###'; return $objTemplate->parse(); } return parent::parse($arrAttributes); }
/** * Add custom HTML after the widget * * @param array $attributes * * @return string */ public function parse($attributes = null) { if (TL_MODE == 'BE') { $template = new BackendTemplate('be_wildcard'); $template->wildcard = '### PAGE BREAK ###'; return $template->parse(); } $manager = new MPFormsFormManager($this->pid); $this->canGoBack = !$manager->isFirstStep(); return parent::parse($attributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { // Return a wildcard in the back end if (TL_MODE == 'BE') { /** @var \BackendTemplate|object $objTemplate */ $objTemplate = new \BackendTemplate('be_wildcard'); $objTemplate->wildcard = '### E&F GRID: ' . $GLOBALS['TL_LANG']['FFL']['rowStart'][0] . ' ###'; $objTemplate->wildcard .= '<div class="tl_content_right tl_gray m12">(' . $GLOBALS['EUF_GRID_SETTING']['row'] . ')</div>'; return $objTemplate->parse(); } return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { // Return a wildcard in the back end if (TL_MODE == 'BE') { /** @var \BackendTemplate|object $objTemplate */ $objTemplate = new \BackendTemplate('be_wildcard'); if ($this->fsType == 'fsStart') { $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['fsStart'][0]) . ' ###' . ($this->label ? '<br>' . $this->label : ''); } else { $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['fsStop'][0]) . ' ###'; } return $objTemplate->parse(); } return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { // Return a wildcard in the back end if (TL_MODE == 'BE') { $objTemplate = new \BackendTemplate('be_wildcard'); if ($this->successType == 'successStart') { $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['successStart'][0]) . ' ###' . ($this->label ? '<br>' . $this->label : ''); } else { $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['tl_form_field']['successStop'][0]) . ' ###'; } return $objTemplate->parse(); } // Only tableless forms are supported if (!$this->tableless) { return ''; } return parent::parse($arrAttributes); }
public function parse($arrAttributes = null) { $this->text = \String::toHtml5($this->text); return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { $strClass = 'select'; if ($this->multiple) { $this->strName .= '[]'; $strClass = 'multiselect'; } elseif (is_array($this->varValue)) { $this->varValue = $this->varValue[0]; } // Chosen if ($this->chosen) { $strClass .= ' tl_chosen'; } // Custom class if ($this->strClass != '') { $strClass .= ' ' . $this->strClass; } $this->strClass = $strClass; return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { if ($this->imageSubmit && $this->singleSRC != '') { $objModel = \FilesModel::findByUuid($this->singleSRC); if ($objModel === null) { if (!\Validator::isUuid($this->singleSRC)) { return '<p class="error">' . $GLOBALS['TL_LANG']['ERR']['version2format'] . '</p>'; } } elseif (is_file(TL_ROOT . '/' . $objModel->path)) { $this->src = $objModel->path; } } return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { $this->confirmLabel = sprintf($GLOBALS['TL_LANG']['MSC']['confirmation'], $this->strLabel); return parent::parse($arrAttributes); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { if ($this->imageSubmit && $this->singleSRC != '') { $objModel = \FilesModel::findByUuid($this->singleSRC); if ($objModel !== null && is_file(TL_ROOT . '/' . $objModel->path)) { $this->src = $objModel->path; } } return parent::parse($arrAttributes); }