/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // parse additional variables $this->tpl->assign('commentsRSSURL', SITE_URL . BackendModel::getURLForBlock($this->URL->getModule(), 'comments_rss')); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign id, term $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('term', $this->record['term']); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the data $this->tpl->assign('item', $this->record); $this->tpl->assign('showDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('delete_category')); }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('item', $this->record); // delete allowed? $this->tpl->assign('showDeleteCategory', BackendBlogModel::deleteCategoryAllowed($this->id) && BackendModel::createURLForAction('delete_category')); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign the active record and additional variables $this->tpl->assign('group', $this->record); }
/** * Parse the datagrid and the reports */ protected function parse() { parent::parse(); // assign datagrid $this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false); // assign the selected theme, so we can propagate it to the add/edit actions. $this->tpl->assign('selectedTheme', urlencode($this->selectedTheme)); }
/** * Parse the form */ protected function parse() { parent::parse(); // parse form $this->frm->parse($this->tpl); // assign iteration $this->tpl->assign(array('modules' => $this->modules)); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the active record and additional variables $this->tpl->assign('mailing', $this->record); $this->tpl->assign('template', $this->template); // parse template content $this->parseTemplateContent(); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign $this->tpl->assign('item', $this->record); // delete allowed? $this->tpl->assign('deleteAllowed', BackendBlogModel::deleteCategoryAllowed($this->id)); }
/** * Parse the form */ protected function parse() { parent::parse(); // parse filter $this->tpl->assign($this->filter); $this->tpl->assign('filterQuery', $this->filterQuery); // assign id, name $this->tpl->assign('name', $this->record['name']); $this->tpl->assign('id', $this->record['id']); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign id, name $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('name', $this->record['name']); // can the category be deleted? if (BackendFaqModel::isCategoryAllowedToBeDeleted($this->id)) { $this->tpl->assign('showDelete', true); } }
/** * Parse the form */ protected function parse() { parent::parse(); $settings = BackendModel::getModuleSettings(); // assign to template $this->tpl->assign('item', $this->record); $this->tpl->assign('settings', $settings['location']); // assign message if address was not be geocoded if ($this->record['lat'] == null || $this->record['lng'] == null) { $this->tpl->assign('errorMessage', BL::err('AddressCouldNotBeGeocoded')); } }
/** * Parse the form */ protected function parse() { parent::parse(); // prevent XSS $filter = SpoonFilter::arrayMapRecursive('htmlspecialchars', $this->filter); // parse filter $this->tpl->assign($filter); $this->tpl->assign('filterQuery', $this->filterQuery); // assign id, name $this->tpl->assign('name', $this->record['name']); $this->tpl->assign('id', $this->record['id']); }
/** * Parse the form */ protected function parse() { parent::parse(); // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } // assign the active record and additional variables $this->tpl->assign('item', $this->record); $this->tpl->assign('feedback', $this->feedback); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign items $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false); $this->tpl->assign('item', $this->record); $this->tpl->assign('groupName', $this->record['name']); }
/** * Parse */ protected function parse() { parent::parse(); // set $this->record['url'] = $this->meta->getURL(); if ($this->id == 1) { $this->record['url'] = ''; } // parse some variables $this->tpl->assign('item', $this->record); $this->tpl->assign('isGod', $this->isGod); $this->tpl->assign('templates', $this->templates); $this->tpl->assign('positions', $this->positions); $this->tpl->assign('extrasData', json_encode(BackendExtensionsModel::getExtrasData())); $this->tpl->assign('extrasById', json_encode(BackendExtensionsModel::getExtras())); $this->tpl->assign('prefixURL', rtrim(BackendPagesModel::getFullURL($this->record['parent_id']), '/')); $this->tpl->assign('formErrors', (string) $this->frm->getErrors()); // init var $showDelete = true; // has children? if (BackendPagesModel::getFirstChildId($this->record['id']) !== false) { $showDelete = false; } if (!$this->record['delete_allowed']) { $showDelete = false; } // allowed? if (!BackendAuthentication::isAllowedAction('delete', $this->getModule())) { $showDelete = false; } // show delete button $this->tpl->assign('showPagesDelete', $showDelete); // assign template $this->tpl->assignArray($this->templates[$this->record['template_id']], 'template'); // parse datagrids $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false); $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false); // parse the tree $this->tpl->assign('tree', BackendPagesModel::getTreeHTML()); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the active record and additional variables $this->tpl->assign('campaign', $this->record); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign id, name $this->tpl->assign('id', $this->id); $this->tpl->assign('name', $this->record['name']); // assign usage-datagrid $this->tpl->assign('usage', $this->dgUsage->getNumResults() != 0 ? $this->dgUsage->getContent() : false); }
/** * Parse the form */ protected function parse() { $this->parseFields(); parent::parse(); $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('name', $this->record['name']); // parse error messages $this->parseErrorMessages(); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign form errors $this->tpl->assign('formErrors', (string) $this->frm->getErrors()); }
/** * Parse the form */ protected function parse() { parent::parse(); // parse settings in template $this->tpl->assign('account', $this->accountLinked); // parse client ID if ($this->accountLinked && !empty($this->settings['cm_client_id'])) { $this->tpl->assign('clientId', $this->settings['cm_client_id']); } // parse god status $this->tpl->assign('userIsGod', BackendAuthentication::getUser()->isGod()); // add all forms to template $this->frmAccount->parse($this->tpl); $this->frmClient->parse($this->tpl); $this->frmGeneral->parse($this->tpl); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign to template $this->tpl->assign('item', $this->record); $this->tpl->assign('settings', $this->settings); $this->tpl->assign('godUser', BackendAuthentication::getUser()->isGod()); $this->settingsForm->parse($this->tpl); // assign message if address was not be geocoded if ($this->record['lat'] == null || $this->record['lng'] == null) { $this->tpl->assign('errorMessage', BL::err('AddressCouldNotBeGeocoded')); } }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign the active record and additional variables $this->tpl->assign('item', $this->record); // assign categories $this->tpl->assign('categories', $this->categories); }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign the active record and additional variables $this->tpl->assign('profile', $this->profile); // parse data grids $this->tpl->assign('dgGroups', $this->dgGroups->getNumResults() != 0 ? $this->dgGroups->getContent() : false); // show delete or undelete button? if ($this->profile['status'] === 'deleted') { $this->tpl->assign('deleted', true); } // show block or unblock button? if ($this->profile['status'] === 'blocked') { $this->tpl->assign('blocked', true); } }
/** * Parse */ protected function parse() { parent::parse(); if (!isset($this->sessionToken)) { // show the link to the google account authentication form $this->tpl->assign('NoSessionToken', true); $this->tpl->assign('Wizard', true); // build the link to the google account authentication form $redirectUrl = SITE_URL . '/' . (strpos($this->URL->getQueryString(), '?') === false ? $this->URL->getQueryString() : substr($this->URL->getQueryString(), 0, strpos($this->URL->getQueryString(), '?'))); $googleAccountAuthenticationForm = sprintf(BackendAnalyticsModel::GOOGLE_ACCOUNT_AUTHENTICATION_URL, urlencode($redirectUrl), urlencode(BackendAnalyticsModel::GOOGLE_ACCOUNT_AUTHENTICATION_SCOPE)); // parse the link to the google account authentication form $this->tpl->assign('googleAccountAuthenticationForm', $googleAccountAuthenticationForm); } // session token is present but no table id if (isset($this->sessionToken) && isset($this->profiles) && !isset($this->tableId)) { // show all possible accounts with their profiles $this->tpl->assign('NoTableId', true); $this->tpl->assign('Wizard', true); $accounts = array(); // no profiles or not authorized if (!empty($this->profiles) && $this->profiles !== 'UNAUTHORIZED') { $accounts[''][0] = BL::msg('ChooseWebsiteProfile'); // prepare accounts array foreach ((array) $this->profiles as $profile) { $accounts[$profile['accountName']][$profile['tableId']] = $profile['title']; } // there are accounts if (!empty($accounts)) { // sort accounts uksort($accounts, array('BackendAnalyticsSettings', 'sortAccounts')); // create form $frm = new BackendForm('linkProfile', BackendModel::createURLForAction(), 'get'); $frm->addDropdown('table_id', $accounts); $frm->parse($this->tpl); if ($frm->isSubmitted()) { if ($frm->getField('table_id')->getValue() == '0') { $this->tpl->assign('ddmTableIdError', BL::err('FieldIsRequired')); } } // parse accounts $this->tpl->assign('accounts', true); } } } // everything is fine if (isset($this->sessionToken) && isset($this->tableId) && isset($this->accountName)) { // show the linked account $this->tpl->assign('EverythingIsPresent', true); // show the title of the linked account and profile $this->tpl->assign('accountName', $this->accountName); $this->tpl->assign('profileTitle', $this->profileTitle); } }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign fields $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('title', $this->record['title']); $this->tpl->assign('revision_id', $this->record['revision_id']); // assign revisions-datagrid $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false); }
/** * Parse the data */ protected function parse() { parent::parse(); $this->tpl->assign('godUser', BackendAuthentication::getUser()->isGod()); }
/** * Parse the form */ protected function parse() { parent::parse(); // reset avatar URL if ($this->record['settings']['avatar'] != '') { $this->record['settings']['avatar'] .= '?time=' . time(); } // only allow deletion of other users $this->tpl->assign('showUsersDelete', BackendAuthentication::getUser()->getUserId() != $this->id && BackendAuthentication::isAllowedAction('delete')); // assign $this->tpl->assign('record', $this->record); $this->tpl->assign('id', $this->id); // assign that we're god or the same user $this->tpl->assign('allowPasswordEdit', BackendAuthentication::getUser()->getUserId() == $this->id || BackendAuthentication::getUser()->isGod()); }
/** * Parse the form */ protected function parse() { parent::parse(); // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail'); $url404 = BackendModel::getURL(404); // parse additional variables if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } // fetch proper slug $this->record['url'] = $this->meta->getURL(); // assign the active record and additional variables $this->tpl->assign('item', $this->record); $this->tpl->assign('status', BL::lbl(SpoonFilter::ucfirst($this->record['status']))); // assign revisions-datagrid $this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false); $this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false); $this->tpl->assign('imageIsAllowed', $this->imageIsAllowed); // assign category if ($this->categoryId !== null) { $this->tpl->assign('categoryId', $this->categoryId); } }
/** * Parse the form */ protected function parse() { parent::parse(); // reset avatar URL if ($this->record['settings']['avatar'] != '') { $this->record['settings']['avatar'] .= '?time=' . time(); } // only allow deletion of other users $this->tpl->assign('showUsersDelete', $this->authenticatedUser->getUserId() != $this->id && BackendAuthentication::isAllowedAction('delete')); // assign $this->tpl->assign('record', $this->record); $this->tpl->assign('id', $this->id); // assign that we're god or the same user $this->tpl->assign('allowPasswordEdit', $this->authenticatedUser->getUserId() == $this->id || $this->authenticatedUser->isGod()); // check if we need to show the password strength and parse the label $this->tpl->assign('showPasswordStrength', $this->record['settings']['password_strength'] !== 'strong'); $this->tpl->assign('passwordStrengthLabel', BL::lbl($this->record['settings']['password_strength'])); }