function __construct($value) { try { parent::__construct($value); } catch (\exception $exception) { throw new exception\domain('Type should be a string matching [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*'); } }
public static function generator($name, $data, $selected_value) { foreach ($data as $value => $text) { $radio = new radio(); $radio->name = $name; $radio->value = $value; if ((string) $radio->value === (string) $selected_value) { $radio->checked = "checked"; } $label = new label(); $label->class = "radio-inline"; //Fit Bootstrap Style $label->appendContent($radio); $label->appendContent($text); (yield $label); } }
/** * Method to show the option group for a table */ public function showTable() { $table = new htmltable(); $table->startRow(); $table->cellpadding = 1; $counter = 0; $equalColumns = (100 - 100 % $this->tableColumns) / $this->tableColumns; foreach ($this->options as $opt => $lbl) { $counter++; $str = '<input type="radio" name="' . $this->name . '"'; $str .= ' value="' . $opt . '"'; if ($this->cssClass) { $str .= ' class="' . $this->cssClass . '"'; } // If no CSS Id is given, it takes the default value of input_$opt for accessibility // If CSS Id is given, it takes the default value of input_$opt for accessibility, as well as CSS one if ($this->cssId) { $cssId = 'input_' . $this->name . $opt . ' ' . $this->cssId; } else { $cssId = 'input_' . $this->name . $opt; } // Cleanup to the CSS Id to make it W3C Compliant // At the moment, it checks for \ and / $cssId = preg_replace('/(\\/|\\\\)/', '_', $cssId); $str .= ' id="' . $cssId . '"'; if ($this->selected == $opt) { $str .= ' checked="checked" '; } if ($this->extra) { $str .= ' ' . $this->extra; } $str .= ' />'; $label = new label($lbl, $cssId); $str .= $label->show(); $table->addCell($str, $equalColumns . '%'); if ($counter % $this->tableColumns == 0) { $table->endRow(); $table->startRow(); } } if ($counter % $this->tableColumns == 0) { $table->endRow(); } else { for ($i = 1; $i < $counter % $this->tableColumns; $i++) { $table->addCell(' ', $equalColumns . '%'); } $table->endRow(); } return $table->show(); }
/** * Method to render an add form to a template * * @param string $module The module to add the parameter */ function showEditAddForm($pmodule) { //Create a form $formAction = $this->uri(array('action' => 'save')); //Load the form class $this->loadClass('form', 'htmlelements'); //Create and instance of the form class $objForm = new form('sysconfig'); //Set the action for the form to the uri with paramArray $objForm->setAction($formAction); //Set the displayType to 3 for freeform $objForm->displayType = 3; //Create a heading for the title //$objHd = $this->newObject('htmlheading', 'htmlelements'); //Load the textinput class $this->loadClass('textinput', 'htmlelements'); //Load the label class $this->loadClass('label', 'htmlelements'); //Load the dropdown class //Kevin Cyster $this->loadClass('dropdown', 'htmlelements'); //Create an element for the input of module $objElement = new textinput("pmodule"); //Set the value of the element to $module if (isset($pmodule)) { $objElement->setValue($pmodule); } //Create label for input of module $label = new label($this->objLanguage->languageText("mod_sysconfig_modtxt", 'sysconfig'), "input_pmodule"); $objForm->addToForm("<p><strong>" . $this->objLanguage->languageText("mod_sysconfig_modtxt", 'sysconfig') . "</strong>: " . $pmodule . "</p>"); //Get the pk value $id = $this->getParam('id'); //Get the records for editing $ar = $this->objDbSysconfig->getRow('id', $id, 'tbl_sysconfig_properties'); //Get the two values needed if (isset($ar)) { $pname = $ar['pname']; $pvalue = $ar['pvalue']; } else { $pname = $this->getParam('id', NULL); $pvalue = $this->getParam('value', NULL); } #if //Create an element for the input of id $objElement = new textinput("id"); $objElement->fldType = "hidden"; $objElement->setValue($id); $objForm->addToForm($objElement->show()); //Create an element for the input of id $objElement = new textinput("pmodule"); $objElement->fldType = "hidden"; $objElement->setValue($pmodule); $objForm->addToForm($objElement->show()); //Add the $name element to the form $objForm->addToForm('<p><b>' . $this->objLanguage->languageText("mod_sysconfig_paramname", 'sysconfig') . '</b>: ' . $pname . '</p>'); // Check in Config folder if module is gives as _site_ if ($pmodule == '_site_') { $moduleToCheck = 'config'; } else { $moduleToCheck = $pmodule; } // Load object that checks if class exists $checkobject = $this->getObject('checkobject', 'utilities'); // Check if class 'sysconfig_{pname}' exists in module. if ($checkobject->objectFileExists('sysconfig_' . str_replace('/', '_', str_replace('-', '_', $pname)), $moduleToCheck)) { // If yes, instantiate the object $objParamValue = $this->getObject(strtolower('sysconfig_' . str_replace('/', '_', str_replace('-', '_', $pname))), $moduleToCheck); // send it the current default value $objParamValue->setDefaultValue($pvalue); } else { $valueLabel = new label($this->objLanguage->languageText("mod_sysconfig_paramvalue", 'sysconfig'), "input_pvalue"); //Add the $value element to the form $objForm->addToForm("<b>" . $valueLabel->show() . "</b>: "); //Create an element for the input of value $objParamValue = new textinput("pvalue"); $objParamValue->size = "50"; //Set the value of the element to $value if (isset($pvalue)) { $objParamValue->setValue($pvalue); } #if } //Create text add link $objForm->addToForm($objParamValue->show() . "<br /><br />"); // Create an instance of the button object and add a save button to the form $this->loadClass('button', 'htmlelements'); // Create a submit button $objElement = new button('submit'); // Set the button type to submit $objElement->setToSubmit(); // Use the language object to add the word save $objElement->setValue(' ' . $this->objLanguage->languageText("word_save") . ' '); // Add the button to the form $objForm->addToForm('<br/>' . $objElement->show()); //Add the form return $objForm->show(); }
public function test_label_with_no_and_x() { $expected = '<span class="label label-important">_no <i class="icon-remove icon-white"></i></span>'; $actual = label::no(); $this->assertSame($expected, $actual); }
<?php $display = '<h1>' . $this->objLanguage->languageText('mod_blog_searchresults', 'blog', 'Search Results') . '</h1>'; $this->loadClass('textinput', 'htmlelements'); $this->loadClass('button', 'htmlelements'); $this->loadClass('form', 'htmlelements'); $this->loadClass('label', 'htmlelements'); $this->loadClass('hiddeninput', 'htmlelements'); $form = new form('search', $this->uri(NULL)); $form->method = 'GET'; $formModule = new hiddeninput('module', 'search'); $search = new textinput('search', $this->getParam('search')); $module = new textinput('searchmodule', $this->getParam('searchmodule')); $searchLabel = new label($this->objLanguage->languageText('word_search', 'system', 'Search') . ': ', 'input_search'); $moduleLabel = new label($this->objLanguage->languageText('word_module', 'system', 'Module') . ': ', 'input_module'); $form->addToForm($formModule->show() . $searchLabel->show() . $search->show()); $form->addToForm(' '); $form->addToForm($moduleLabel->show() . $module->show()); $button = new button('go', $this->objLanguage->languageText('word_go', 'system', 'Go')); $button->setToSubmit(); $form->addToForm(' ' . $button->show()); $display .= $form->show(); $objSearchResults = $this->getObject('searchresults'); $searchKey = $this->getParam('search', $this->getParam('query')); $display .= $objSearchResults->displaySearchResults($searchKey, $this->getParam('searchmodule')); $this->setVar('middleContent', $display); $cssLayout = $this->newObject('csslayout', 'htmlelements'); $cssLayout->setNumColumns(1); $middleColumn = $display; $cssLayout->setMiddleColumnContent($middleColumn); echo $cssLayout->show();
/** * Method to generate an edit context settings form * @param array $context Current Context Settings * @return str */ public function editContextForm($context) { $header = new htmlheading(); $header->type = 1; $header->str = $this->objLanguage->languageText('word_edit', 'system', 'Edit') . ': ' . $context['title']; $str = $header->show(); $title = new textinput('title'); $title->size = 50; if ($context != NULL) { $title->value = htmlentities($context['title']); } $titleLabel = new label($this->objLanguage->languageText('word_title', 'system', 'Title'), 'input_title'); $status = new dropdown('status'); //$status->setBreakSpace('<br />'); $status->addOption('Published', $this->objLanguage->languageText('word_published', 'system', 'Published')); $status->addOption('Unpublished', $this->objLanguage->languageText('word_unpublished', 'system', 'Unpublished')); if ($context != NULL) { $status->setSelected($context['status']); } if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'true') { if (is_null($context)) { $access_ = 'Private'; } else { $access_ = $context['access']; } $access = new hiddeninput('access', $access_); } else { $access = new radio('access'); $access->setBreakSpace('<br />'); $access->addOption('Public', '<strong>' . $this->objLanguage->languageText('word_public', 'system', 'Public') . '</strong> - <span class="caption">' . ucfirst($this->objLanguage->code2Txt('mod_context_publiccontextdescription', 'context', NULL, '[-context-] can be accessed by all users, including anonymous users')) . '</span>'); $access->addOption('Open', '<strong>' . $this->objLanguage->languageText('word_open', 'system', 'Open') . '</strong> - <span class="caption">' . ucfirst($this->objLanguage->code2Txt('mod_context_opencontextdescription', 'context', NULL, '[-context-] can be accessed by all users that are logged in')) . '</span>'); $access->addOption('Private', '<strong>' . $this->objLanguage->languageText('word_private', 'system', 'Private') . '</strong> - <span class="caption">' . $this->objLanguage->code2Txt('mod_context_privatecontextdescription', 'context', NULL, 'Only [-context-] members can enter the [-context-]') . '<span class="caption">'); if ($context != NULL) { $access->setSelected($context['access']); } else { $access->setSelected('Public'); } } $table = $this->newObject('htmltable', 'htmlelements'); if ($context != NULL) { $table->startRow(); $table->addCell(ucwords($this->objLanguage->code2Txt('mod_context_contextcode', 'context', NULL, '[-context-] Code')) . ':', 100); $table->addCell('<strong>' . $context['contextcode'] . '</strong>'); $table->endRow(); } else { $code = new textinput('contextcode'); $codeLabel = new label(ucwords($this->objLanguage->code2Txt('mod_context_contextcode', 'context', NULL, '[-context-] Code')), 'input_contextcode'); $table->startRow(); $table->addCell($codeLabel->show(), 100); $table->addCell($code->show() . ' <span id="contextcodemessage"></span>'); $table->endRow(); } $table->startRow(); $table->addCell($titleLabel->show() . ':'); $table->addCell($title->show()); $table->endRow(); $table->startRow(); $table->addCell(' '); $table->addCell(' '); $table->endRow(); $table->startRow(); $table->addCell($this->objLanguage->languageText('word_status', 'system', 'Status') . ':'); $table->addCell($status->show()); $table->endRow(); if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'false') { $table->startRow(); $table->addCell($this->objLanguage->languageText('word_access', 'system', 'Access') . ':'); $table->addCell($access->show()); $table->endRow(); } $alerts = explode("|", $context['alerts']); $emailAlert = new checkbox('emailalertopt', $this->objLanguage->languageText('mod_contextadmin_emailalert', 'contextadmin', 'Email alerts'), $alerts[0] == 'e' || $alerts[0] == '1'); // this will checked //$alerts=array(); //$emailchecked=; //$emailAlert->setChecked(FALSE); //if($emailchecked) { // $emailAlert->setChecked($emailchecked); //} $table->startRow(); $table->addCell($this->objLanguage->languageText('mod_contextadmin_emailalert', 'contextadmin', 'Alerts')); $table->addCell($emailAlert->show()); $table->endRow(); $objSelectImage = $this->getObject('selectimage', 'filemanager'); $objSelectImage->context = TRUE; $table2 = $this->newObject('htmltable', 'htmlelements'); $table2->startRow(); $table2->addCell($table->show(), 600, NULL, NULL, NULL, 'colspan="2"'); $table2->addCell($objSelectImage->show()); $table2->endRow(); $table2->startRow(); $table2->addCell(' '); $table2->addCell(' '); $table2->addCell(' '); $table2->endRow(); $table2->startRow(); $table2->addCell(ucwords($this->objLanguage->code2Txt('mod_context_aboutcontext', 'context', NULL, 'About [-context-]')) . ':', 100); $htmlEditor = $this->newObject('htmlarea', 'htmlelements'); $htmlEditor->name = 'about'; $htmlEditor->toolbarSet = 'advanced'; if ($context != NULL) { $htmlEditor->value = $context['about']; } $table2->addCell($htmlEditor->show(), NULL, NULL, NULL, NULL, 'colspan="2"'); $table2->endRow(); $table2->startRow(); $table2->addCell(' '); $table2->addCell(' '); $table2->addCell(' '); $table2->endRow(); $table2->startRow(); $table2->addCell(' ', 100); if ($context == NULL) { $button = new button('savecontext', $formButton); } else { $button = new button('savecontext', ucwords($this->objLanguage->code2Txt('mod_context_updatecontext', 'context', NULL, 'Update [-context-]'))); } $button->setToSubmit(); $table2->addCell($button->show(), NULL, NULL, NULL, NULL, 'colspan="2"'); $table2->endRow(); $form = new form('createcontext', $this->uri(array('action' => $this->formAction), $this->formModule)); $form->addToForm($table2->show()); if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'true') { $form->addToForm($access->show()); } if ($context != NULL) { $hiddenInput = new hiddeninput('contextcode', $context['contextcode']); $form->addToForm($hiddenInput->show()); } $form->addRule('title', $this->objLanguage->code2Txt('mod_context_entertitleofcontext', 'context', NULL, 'Please enter the title of your [-context-]'), 'required'); $str .= $form->show(); return $str; }
foreach ($newPlugins as $plugin) { $counter++; $checkbox = new checkbox('plugins[]'); $checkbox->setValue($plugin['module_id']); $checkbox->setId('module_' . $plugin['module_id']); if (in_array($plugin['module_id'], $contextModules)) { $checkbox->setChecked(TRUE); } $objIcon->setModuleIcon($plugin['module_id']); if ($counter % 2 == 1) { $table->startRow(); } $table->addCell($checkbox->show(), 20); $label = new label($objIcon->show(), 'module_' . $plugin['module_id']); $table->addCell($label->show(), 30); $label = new label('<strong>' . $plugin['title'] . '</strong><br />' . $plugin['description'], 'module_' . $plugin['module_id']); $table->addCell($label->show() . '<br /><br />'); if ($counter % 2 == 2) { $table->endRow(); } } if ($counter % 2 == 1) { $table->addCell(' '); $table->addCell(' '); $table->addCell(' '); $table->endRow(); } $form->addToForm($table->show()); $button = new button('submitform', $this->objLanguage->code2Txt('mod_context_savepluginsabs', 'context', array('plugins' => 'plugins'), 'Save [-plugins-]')); $button->setToSubmit(); $backUri = $this->uri(array('action' => 'step3', 'mode' => 'edit', 'contextCode' => $contextCode), 'contextadmin');
public function environment_check_table($result, $environment_results) { global $CFG; $servertable = new html_table(); $servertable->head = array(get_string('name'), get_string('info'), get_string('report'), get_string('status')); $servertable->attributes['class'] = 'table table-striped table-hover'; $serverdata = array('success' => array(), 'warning' => array(), 'important' => array()); $othertable = new html_table(); $othertable->head = array(get_string('info'), get_string('report'), get_string('status')); $othertable->attributes['class'] = 'table table-striped table-hover'; $otherdata = array('success' => array(), 'warning' => array(), 'important' => array()); // Iterate over each environment_result $continue = true; foreach ($environment_results as $environment_result) { $errorline = false; $warningline = false; $stringtouse = ''; if ($continue) { $type = $environment_result->getPart(); $info = $environment_result->getInfo(); $status = $environment_result->getStatus(); $error_code = $environment_result->getErrorCode(); // Process Report field $rec = new stdClass(); // Something has gone wrong at parsing time if ($error_code) { $stringtouse = 'environmentxmlerror'; $rec->error_code = $error_code; $status = get_string('error'); $errorline = true; $continue = false; } if ($continue) { if ($rec->needed = $environment_result->getNeededVersion()) { // We are comparing versions $rec->current = $environment_result->getCurrentVersion(); if ($environment_result->getLevel() == 'required') { $stringtouse = 'environmentrequireversion'; } else { $stringtouse = 'environmentrecommendversion'; } } else { if ($environment_result->getPart() == 'custom_check') { // We are checking installed & enabled things if ($environment_result->getLevel() == 'required') { $stringtouse = 'environmentrequirecustomcheck'; } else { $stringtouse = 'environmentrecommendcustomcheck'; } } else { if ($environment_result->getPart() == 'php_setting') { if ($status) { $stringtouse = 'environmentsettingok'; } else { if ($environment_result->getLevel() == 'required') { $stringtouse = 'environmentmustfixsetting'; } else { $stringtouse = 'environmentshouldfixsetting'; } } } else { if ($environment_result->getLevel() == 'required') { $stringtouse = 'environmentrequireinstall'; } else { $stringtouse = 'environmentrecommendinstall'; } } } } // Calculate the status value if ($environment_result->getBypassStr() != '') { //Handle bypassed result (warning) $status = get_string('bypassed'); $warningline = true; } else { if ($environment_result->getRestrictStr() != '') { //Handle restricted result (error) $status = get_string('restricted'); $errorline = true; } else { if ($status) { //Handle ok result (ok) $status = get_string('ok'); } else { if ($environment_result->getLevel() == 'optional') { //Handle check result (warning) $status = get_string('check'); $warningline = true; } else { //Handle error result (error) $status = get_string('check'); $errorline = true; } } } } } // Build the text $linkparts = array(); $linkparts[] = 'admin/environment'; $linkparts[] = $type; if (!empty($info)) { $linkparts[] = $info; } if (empty($CFG->docroot)) { $report = get_string($stringtouse, 'admin', $rec); } else { $report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec)); } // Format error or warning line if ($errorline || $warningline) { $messagetype = $errorline ? 'important' : 'warning'; } else { $messagetype = 'success'; } $status = label::make($messagetype, $status); // Here we'll store all the feedback found $feedbacktext = ''; // Append the feedback if there is some $feedbacktext .= $environment_result->strToReport($environment_result->getFeedbackStr(), 'alert alert-' . $messagetype); //Append the bypass if there is some $feedbacktext .= $environment_result->strToReport($environment_result->getBypassStr(), 'alert'); //Append the restrict if there is some $feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(), 'alert alert-important'); $report .= $feedbacktext; // Add the row to the table if ($environment_result->getPart() == 'custom_check') { $otherdata[$messagetype][] = array($info, $report, $status); } else { $serverdata[$messagetype][] = array($type, $info, $report, $status); } } } $servertable->data = array_merge($serverdata['important'], $serverdata['warning'], $serverdata['success']); $othertable->data = array_merge($otherdata['important'], $otherdata['warning'], $otherdata['success']); $output = $this->heading(get_string('serverchecks', 'admin')); $output .= html_writer::table($servertable); if (count($othertable->data)) { $output .= $this->heading(get_string('customcheck', 'admin')); $output .= html_writer::table($othertable); } // Finally, if any error has happened, print the summary box. if (!$result) { $output .= bootstrap::alert_error(get_string('environmenterrortodo', 'admin')); } return $output; }
$page[$j]['id'] = $item['id']; $page[$j++]['page'] = $item['category']; } else { // toolbar links $toolBar[$k]['id'] = $item['id']; $toolBar[$k++]['category'] = $item['category']; } } } } $objHead->str = $heading; $objHead->type = 1; $str = $objHead->show(); $str .= '<p><b>' . $moduleLabel . ':</b> ' . $modName . '</p>'; // Drop down to select a different module $objLabel = new label($selectLabel, 'input_modulename'); $objDrop = new dropdown('modulename'); $objDrop->extra = 'onchange="document.forms[\'modselect\'].submit()"'; foreach ($moduleList as $item) { $modName = $objLanguage->code2Txt('mod_' . $item['module_id'] . '_name', $item['module_id']); $objDrop->addOption($item['module_id'], $modName); } $objDrop->setSelected($moduleName); $objForm = new form('modselect', $this->uri(array('action' => 'editlinks'))); $objForm->addToForm('<b>' . $objLabel->show() . ':</b> ' . $objDrop->show()); $str .= '<p>' . $objForm->show() . '</p>'; // Toolbar links $addTool = $objIcon->getAddIcon($this->uri(array('action' => 'addtool', 'modulename' => $moduleName))); $objHead->str = $toolbarLabel . ' ' . $addTool; $objHead->type = 3; $str .= $objHead->show();
/** * Short description for function * * Long description (if any) ... * * @param array $subFolders Parameter description (if any) ... * @param array $files Parameter description (if any) ... * @return object Return description (if any) ... * @access public */ function previewLongView($subFolders, $files, $symlinks, $restriction, $mode, $name, $forceRestriction = FALSE) { $objTable = $this->newObject('htmltable', 'htmlelements'); $objFilePreview = $this->getObject('filepreview'); $objFileSize = new formatfilesize(); $objThumbnail = $this->getObject('thumbnails', 'filemanager'); if ($this->viewType == strtolower('thumbnails')) { $objTable->cssId = $this->objLanguage->languageText('mod_filemanager_filemanagertableclass', 'filemanager', 'filemanagerTable'); $this->objFileIcons->size = 'large'; } $objIcon = $this->newObject('geticon', 'htmlelements'); if ($this->editPermission) { if ($this->viewType != strtolower('thumbnails')) { $objTable->startHeaderRow(); $objTable->addHeaderCell(' ', '20'); } } if ($this->viewType != strtolower('thumbnails')) { $objTable->addHeaderCell(' ', '20'); $objTable->addHeaderCell($this->objLanguage->languageText('word_name', 'system', 'Name')); $objTable->addHeaderCell($this->objLanguage->languageText('word_size', 'system', 'Size'), 60); $objTable->addHeaderCell(' ', '30'); } // Set Restriction as empty if it is none if (count($restriction) == 1 && $restriction[0] == '') { $restriction = array(); } $objTable->endHeaderRow(); $hidden = 0; if (count($subFolders) == 0 && count($files) == 0 && count($symlinks) == 0) { $objTable->startRow(); $objTable->addCell('<em>' . $this->objLanguage->languageText('mod_filemanager_nofilesorfolders', 'filemanager', 'No files or folders found') . '</em>', NULL, NULL, NULL, 'noRecordsMessage', 'colspan="5"'); $objTable->endRow(); } else { if (count($subFolders) > 0) { $folderIcon = $this->objFileIcons->getExtensionIcon('folder'); foreach ($subFolders as $folder) { $this->domDoc = new DOMDocument('utf-8'); $domElements['viewDiv'] = $this->domDoc->createElement('div'); $domElements['viewDiv']->setAttribute('class', 'fm_thumbnails'); $domElements['folderLink'] = $this->domDoc->createElement('a'); //The DOM icon folder $domElements['folderIcon'] = $this->domDoc->createElement('img'); $domElements['folderIcon']->setAttribute('src', $this->objFileIcons->getIconSrc('folder')); $domElements['folderIcon']->setAttribute('class', 'iconThumbnail'); $domElements['folderLink']->setAttribute('title', $this->objLanguage->languageText('mod_filemanager_clicktoopen', 'filemanager')); $domElements['folderLink']->setAttribute('href', str_replace('amp;', '', $this->uri(array('action' => 'viewfolder', 'folder' => $folder['id'], 'view' => $this->viewType), $this->targetModule))); $objTable->startRow(); if ($this->editPermission) { $checkbox = new checkbox('files[]'); $checkbox->value = 'folder__' . $folder['id']; $checkbox->cssId = htmlentities('input_files_' . basename($folder['folderpath'])); //The DOM folder checkbox $domElements['folderCheckbox'] = $this->domDoc->createElement('input'); $domElements['folderCheckbox']->setAttribute('type', 'checkbox'); $domElements['folderCheckbox']->setAttribute('name', 'files[]'); $domElements['folderCheckbox']->setAttribute('id', htmlentities('input_files_' . basename($folder['folderpath']))); $domElements['folderCheckbox']->setAttribute('value', 'folder__' . $folder['id']); $domElements['folderCheckbox']->setAttribute('class', 'transparentbgnb'); //Delete confirm object $delConfirm = $this->getObject('confirm', 'utilities'); //Setting the confirmation message $delConfirm->setConfirm(NULL, str_replace('amp;', '', $this->uri(array('action' => 'deletefolder', 'id' => $folder['id'], 'module' => $this->targetModule))), $this->objLanguage->languageText('mod_filemanager_areyousuredeletefiles', 'filemanager'), NULL); //The DOM delete link $domElements['deleteconfirm'] = $this->domDoc->createElement('a'); $domElements['deleteconfirm']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText('word_delete', 'system'))); $domElements['deleteconfirm']->setAttribute('class', $this->objLanguage->languageText('mod_filemanager_buttonlinkclass', 'filemanager')); $domElements['deleteconfirm']->setAttribute('href', $delConfirm->href); $domElements['viewDiv']->appendChild($domElements['folderCheckbox']); $domElements['viewDiv']->appendChild($domElements['deleteconfirm']); $domElements['viewDiv']->appendChild($this->domDoc->createElement('br')); if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($checkbox->show()); } } //The value to appear when the mouse is over the link $domElements['folderParagraph'] = $this->domDoc->createElement('p'); $domElements['folderParagraph']->setAttribute('class', 'folderdetails'); $domElements['folderParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("phrase_foldername", "system") . ": " . substr(basename($folder['folderpath']), 0, 12))); $domElements['folderParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['folderParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("word_files", "system") . ": " . count($this->objFiles->getFolderFiles($folder['folderpath'])))); $domElements['folderParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['folderParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("word_folders", "system") . ": " . count($this->objFolder->getSubFolders($folder['id'])))); //creating space between the link at the top and the string below $domElements['viewDiv']->appendChild($this->domDoc->createElement('p')); $domElements['folderLink']->appendChild($domElements['folderIcon']); $domElements['folderLink']->appendChild($domElements['folderParagraph']); $domElements['viewDiv']->appendChild($this->domDoc->createElement('br')); $domElements['viewDiv']->appendChild($domElements['folderLink']); if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($folderIcon); } $folderLink = new link($this->uri(array('action' => 'viewfolder', 'folder' => $folder['id'], 'view' => $this->viewType), $this->targetModule)); $extTitle = ''; $accessVal = null; if (key_exists("access", $folder)) { $accessVal = $folder['access']; } if ($accessVal == 'private_all') { $objIcon->setIcon('info'); $extTitle = $objIcon->show(); $domElements['folderParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['folderParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText('word_access', 'system') . ': ')); $domElements['folderParagraph']->appendChild($this->domDoc->createTextNode($folder['access'])); } //TODO: make this a reusable function //variables to store informatin partaining folder contants $nmbrOfFiles = count($this->objFiles->getFolderFiles($folder['folderpath'])); $nmbrOfFolders = count($this->objFolder->getSubFolders($folder['id'])); //Assign the value to be displayed on the link's title depending on it's contents if ($nmbrOfFiles == 0 && $nmbrOfFolders == 0) { $titleString = $this->objLanguage->languageText("mod_filemanager_emptyfolderindicator", "filemanager"); } else { $titleString = $this->objLanguage->languageText("mod_filemanager_contentsindicator", "filemanager"); $titleString = substr($titleString, 0, 9) . $nmbrOfFolders . substr($titleString, 8, 11) . $nmbrOfFiles . substr($titleString, 18, 12); } //End subfolder and files count $folderLink->title = $titleString; $folderLink->link = substr(basename($folder['folderpath']), 0, 70) . '...' . $extTitle; if ($this->viewType == strtolower('thumbnails')) { $objTable->addCell($this->domDoc->saveHTML($domElements['viewDiv'])); } else { $objTable->addCell($folderLink->show()); $objTable->addCell('<em>' . $this->objLanguage->languageText('word_folder', 'system', 'Folder') . '</em>'); $objTable->endRow(); } } } if (is_array($symlinks)) { $files = array_merge($files, $symlinks); } if (count($files) > 0) { //var_dump($files); $fileSize = new formatfilesize(); foreach ($files as $file) { $this->domDoc = new DOMDocument('utf-8'); $domElements['viewDiv'] = $this->domDoc->createElement('div'); $domElements['viewDiv']->setAttribute('class', 'fm_thumbnails'); $visibility = null; if (key_exists("visibility", $file)) { $visibility = $file['visibility']; } else { $file['visibility'] = 'visible'; } $showFile = true; if ($visibility == 'hidden') { if ($file['creatorid'] == $this->objUser->userid()) { $showFile = true; } else { $showFile = false; } } if (!$showFile) { continue; } if (count($restriction) > 0) { if (!in_array(strtolower($file['datatype']), $restriction)) { $objTable->startRow('hidefile'); $hidden++; } else { $objTable->startRow(); } } else { $objTable->startRow(); } if ($this->editPermission) { $checkbox = new checkbox('files[]'); //DOM checkbox $domElements['checkbox'] = $this->domDoc->createElement('input'); $domElements['checkbox']->setAttribute('type', 'checkbox'); $domElements['checkbox']->setAttribute('name', 'files[]'); //DOM link $domElements['editLink'] = $this->domDoc->createElement('a'); $domElements['editLink']->setAttribute('title', $this->objLanguage->languageText('mod_filemanager_clicktoedit', 'filemanager')); $domElements['editLink']->setAttribute('href', str_replace('amp;', '', $this->uri(array('action' => 'editfiledetails', 'id' => $file['id']), $this->targetModule))); if (isset($file['symlinkid'])) { $domElements['checkbox']->setAttribute('value', 'symlink_' . $file['symlinkid']); $checkbox->value = 'symlink__' . $file['symlinkid']; } else { $checkbox->value = $file['id']; $domElements['checkbox']->setAttribute('value', $file['id']); } $checkbox->cssId = htmlentities('input_files_' . $file['filename']); if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($checkbox->show()); } else { $domElements['checkbox']->setAttribute('id', htmlentities('input_files_' . $file['filename'])); $domElements['viewDiv']->appendChild($domElements['checkbox']); $domElements['editLink']->setAttribute('class', $this->objLanguage->languageText("mod_filemanager_buttonlinkclass", "filemanager")); $domElements['editLink']->appendChild($this->domDoc->createTextNode(substr($this->objLanguage->languageText("word_edit", "system"), 0, 4))); $domElements['viewDiv']->appendChild($domElements['editLink']); //Add the line separator $domElements['viewDiv']->appendChild($this->domDoc->createTextNode(' | ')); } } $label = new label($this->objFileIcons->getFileIcon($file['filename']), htmlentities('input_files_' . $file['filename'])); if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($label->show()); } if (isset($file['symlinkid'])) { $fileLink = new link($this->uri(array('action' => 'symlink', 'id' => $file['symlinkid']))); //The DOM file link $domElements['fileLink'] = $this->domDoc->createElement('a'); $domElements['fileLink']->setAttribute('href', str_replace('amp;', '', $this->uri(array('action' => 'symlink', 'id' => $file['symlinkid'])))); } else { $fileLink = new link($this->uri(array('action' => 'fileinfo', 'id' => $file['id']), $this->targetModule)); //The DOM file link $domElements['fileLink'] = $this->domDoc->createElement('a'); $domElements['fileLink']->setAttribute('class', 'fileLink'); $domElements['fileLink']->setAttribute('href', str_replace('amp;', '', $this->uri(array('action' => 'fileinfo', 'id' => $file['id']), $this->targetModule))); } //The DOM image paragraph (to display image file information) $domElements['imgParagraph'] = $this->domDoc->createElement('p'); $domElements['imgParagraph']->setAttribute('class', 'filedetails'); $linkTitle = ''; $access = null; if (key_exists("access", $file)) { $access = $file['access']; } else { $file['access'] = 'public'; } $domElements['fileLink']->setAttribute('title', $this->objLanguage->languageText('mod_filemanager_clicktoviewinfo', 'filemanager')); //The DOM download link $domElements['downloadLink'] = $this->domDoc->createElement('a'); $domElements['downloadLink']->setAttribute('title', $this->objLanguage->languageText('mod_filemanager_clicktodownload', 'filemanager')); $domElements['downloadLink']->setAttribute('href', $this->objCleanUrl->cleanUpUrl($this->objAltConfig->getcontentPath() . $file['path'])); $domElements['downloadLink']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("word_download", "system"))); $domElements['downloadLink']->setAttribute('class', $this->objLanguage->languageText("mod_filemanager_buttonlinkclass", "filemanager")); $domElements['viewDiv']->appendChild($domElements['downloadLink']); //creating space between the links at the top and the string below $domElements['viewDiv']->appendChild($this->domDoc->createElement('br')); $filepath = $this->objAltConfig->getSiteRoot() . '/usrfiles/' . $file['path']; $fileType = $this->getObject("fileparts", "files"); $domElements['detailsDiv'] = $this->domDoc->createElement('div'); $domElements['imgDiv'] = $this->domDoc->createElement('div'); $domElements['imgDiv']->setAttribute('class', 'imageDiv'); $domElements['imgParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['imgParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("word_filename", "system") . ": " . substr($file['filename'], 0, 10))); //new line $domElements['imgParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['imgParagraph']->appendChild($this->domDoc->createtextNode($this->objLanguage->languageText("phrase_filesize", "system") . ": " . $objFileSize->formatsize($file['filesize']))); //new line $domElements['imgParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['imgParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("phrase_filetype") . ": " . $fileType->getExtension($file['filename']))); //new line $domElements['imgParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['imgParagraph']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText("phrase_dateuploaded", "system") . ": " . $file['datecreated'])); if ($access == 'private_all') { $domElements['imgParagraph']->appendChild($this->domDoc->createElement('br')); $domElements['imgParagraph']->appendChild($this->domDoc->createTextNode(ucfirst($this->objLanguage->languageText('word_access', 'system')) . ': ')); $domElements['imgParagraph']->appendChild($this->domDoc->createTextNode($folder['access'])); $domElements['viewDiv']->setAttribute('id', $file['access']); $objIcon->setIcon('info'); $linkTitle = basename($file['filename']) . $objIcon->show(); } else { $linkTitle = basename($file['filename']); } // get image thumbnails //The DOM image $domElements['image'] = $this->domDoc->createElement('img'); if (ereg("image", $file['mimetype']) || ereg("video", $file['mimetype'])) { $domElements['image']->setAttribute('src', str_replace('amp;', '', $objThumbnail->getThumbnail($file['id'], $file['filename'], $this->objCleanUrl->cleanUpUrl($this->objAltConfig->getcontentPath() . $file['path']), 'large'))); $domElements['image']->setAttribute('class', 'imgThumbnail'); $domElements['imgDiv']->appendChild($domElements['image']); $domElements['detailsDiv']->appendChild($domElements['imgParagraph']); } //create audio/video player object $objPlayer = ""; if (ereg("audio", $file['mimetype'])) { $objPlayer = $objFilePreview->previewFile($file['id']); $domElements['viewDiv']->appendChild($domElements['fileLink']); $domElements['imgParagraph']->removeAttribute('class'); $domElements['detailsDiv']->appendChild($domElements['imgParagraph']); } //other formats if (!ereg("audio", $file['mimetype']) && !ereg("image", $file['mimetype']) && !ereg("video", $file['mimetype'])) { $domElements['image']->setAttribute('src', $this->objFileIcons->getIconSrc($file['datatype'])); $domElements['image']->setAttribute('class', 'iconThumbnail'); $domElements['image']->normalize(); $domElements['imgDiv']->appendChild($domElements['image']); $domElements['detailsDiv']->appendChild($domElements['imgParagraph']); } $domElements['fileLink']->appendChild($domElements['detailsDiv']); $domElements['fileLink']->appendChild($domElements['imgDiv']); $domElements['viewDiv']->appendChild($domElements['fileLink']); $fileLink->link = $linkTitle; $folderAccessObj = $this->getObject("folderaccess"); $filepath = $this->objAltConfig->getSiteRoot() . '/usrfiles/' . $file['path']; //// $filePreviewObj->previewFile($file['id']); //$this->uri(array("action" => "downloadsecurefile", "path" => $file['path'], "filename" => $file['filename'])); // echo "rssult == ". $folderAccessObj->isFileAccessPrivate($file); // die(); if ($folderAccessObj->isFileAccessPrivate($file)) { $filepath = $this->objAltConfig->getSiteRoot() . "index.php?module=filemanager&action=file&id=" . $file['id'] . '&filename=' . $file['filename']; } $selectStr = '<a href=\'javascript:selectFile("' . $filepath . '");\'>' . basename($file['filename']) . '</a>'; $selectFileStr = '<a href=\'javascript:selectFileWindow("' . $name . '","' . $file['filename'] . '","' . $file['id'] . '");\'>' . basename($file['filename']) . '</a>'; $selectImageStr = '<a href=\'javascript:selectImageWindow("' . $name . '", "' . $filepath . '","' . $file['filename'] . '","' . $file['id'] . '");\'>' . basename($file['filename']) . '</a>'; if ($mode == 'fckimage' || $mode == 'fckflash' || $mode == 'fcklink') { if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($selectStr); } else { //Disable file preview $domElements['fileLink']->removeAttribute('href'); //remove the title string as the option will not be possible $domElements['fileLink']->removeAttribute('title'); //The DOM select string $domElements['selectStr'] = $this->domDoc->createElement('a'); $domElements['selectStr']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText('word_select', 'system'))); $domElements['selectStr']->setAttribute('href', 'javascript:selectFile("' . $filepath . '");'); $domElements['selectStr']->setAttribute('class', $this->objLanguage->languageText('mod_filemanager_buttonlinkclass', 'filemanager')); $domElements['viewDiv']->appendChild($domElements['selectStr']); $objTable->addCell($this->domDoc->saveHTML($domElements['viewDiv']) . $objPlayer); } } else { if ($mode == 'selectfilewindow') { if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($selectFileStr); } else { $domElements['fileLink']->removeAttribute('href'); //remove the title string as the option will not be possible $domElements['fileLink']->removeAttribute('title'); //The DOM select file string $domElements['selectFileStr'] = $this->domDoc->createElement('a'); $domElements['selectFileStr']->setAttribute('href', 'javascript:selectFileWindow("' . $name . '","' . $file['filename'] . '","' . $file['id'] . '");'); $domElements['selectFileStr']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText('word_select', 'system'))); $domElements['selectFileStr']->setAttribute('class', $this->objLanguage->languageText('mod_filemanager_buttonlinkclass', 'filemanager')); $domElements['viewDiv']->appendChild($domElements['selectFileStr']); $objTable->addCell($this->domDoc->saveHTML($domElements['viewDiv']) . $objPlayer); } } else { if ($mode == 'selectimagewindow') { if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($selectImageStr); } else { $domElements['fileLink']->removeAttribute('href'); //remove the title string as the option will not be possible $domElements['fileLink']->removeAttribute('title'); //The DOM image select link $domElements['imageSelect'] = $this->domDoc->createElement('a'); $domElements['imageSelect']->setAttribute('href', 'javascript:selectImageWindow("' . $name . '","' . $filepath . '","' . $file['filename'] . '","' . $file['id'] . '");'); $domElements['imageSelect']->appendChild($this->domDoc->createTextNode($this->objLanguage->languageText('word_select', 'system'))); $domElements['imageSelect']->setAttribute('class', $this->objLanguage->languageText('mod_filemanager_buttonlinkclass', 'filemanager')); $domElements['viewDiv']->appendChild($domElements['imageSelect']); $objTable->addCell($this->domDoc->saveHTML($domElements['viewDiv']) . $objPlayer); } } else { if ($this->viewType == strtolower('thumbnails')) { //return the document with all available objects and elements $objTable->addCell($this->domDoc->saveHTML($domElements['viewDiv']) . $objPlayer); } else { $objTable->addCell($fileLink->show()); } } } } if ($this->viewType != strtolower('thumbnails')) { $objTable->addCell($fileSize->formatsize($file['filesize'])); } else { $objTable->endRow(); } } } } if ($hidden > 0 && count($restriction) > 0) { $str = ''; if ($this->viewType == strtolower('thumbnails')) { $str .= '<style type="text/css"> #filemanagerTable tr.hidefile {display:none;} </style>'; } else { $str .= '<style type="text/css"> tr.hidefile {display:none;} </style>'; } $str .= $this->objLanguage->languageText('mod_filemanager_browsingfor', 'filemanager', 'Browsing for') . ': '; $comma = ''; foreach ($restriction as $restrict) { $str .= $comma . $restrict; $comma = ', '; } if (!$forceRestriction) { if ($this->viewType == strtolower('thumbnails')) { $str .= '<script type="text/javascript"> var onOrOff = "off"; function turnOnFiles(value) { if (onOrOff == \'off\') { jQuery(\'#filemanagerTable tr.hidefile\').each(function (i) { this.style.display = \'inline-block\'; }); adjustLayout(); onOrOff = "on"; } else { jQuery(\'#filemanagerTable tr.hidefile\').each(function (i) { this.style.display = \'none\'; }); adjustLayout(); onOrOff = "off"; } } </script>'; } else { $str .= '<script type="text/javascript"> var onOrOff = "off"; function turnOnFiles(value) { if (onOrOff == \'off\') { jQuery(\'tr.hidefile\').each(function (i) { this.style.display = \'table-row\'; }); adjustLayout(); onOrOff = "on"; } else { jQuery(\'tr.hidefile\').each(function (i) { this.style.display = \'none\'; }); adjustLayout(); onOrOff = "off"; } } </script>'; } $str .= ' - '; $this->loadClass('checkbox', 'htmlelements'); $this->loadClass('label', 'htmlelements'); $checkbox = new checkbox('showall'); $checkbox->extra = ' onclick="turnOnFiles();"'; $label = new label($this->objLanguage->languageText('mod_filemanager_showallfiles', 'filemanager', 'Show All Files'), $checkbox->cssId); $str .= $checkbox->show() . $label->show(); } } else { $str = ''; } return $str . $objTable->show() . $this->getJavascriptFile('thumbnails.js', 'filemanager'); }
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/stageDevelopment.js" type="text/javascript"></script> <!--Style to Forms--> <link type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/formsStyle.css" rel="Stylesheet" id="linkestilo"> <!--Style to Tabs--> <link type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/tabs/tabs.css" rel="Stylesheet" id="linkestilo"> </head> <body> <?php $url=$_SERVER['REQUEST_URI']; $id = substr($url, 48); $stage = Tstage_information::model()->findAllBySql('SELECT * FROM tstage_information WHERE idRider='.$id); $labels = label::model()->findAllBySql('SELECT * FROM tlabel WHERE id_rider='.$id); ?> <div class="block0"> <div class="about"> <?php foreach ($bandInfo as $data):?> <h2><?php echo $data->name_band; ?></h2> <?php echo $data->desc_band; ?><br><br> <div style="text-align:left;"> <h2>Genre</h2> <?php echo $data->genre_band; ?><br><br> <h2>Contact</h2> <?php echo $data->page_band; ?><br> <?php echo $data->email_band; ?> </div>
/** * Standard block show method. It uses the renderform * class to render the login box */ public function show() { $this->loadClass('label', 'htmlelements'); $this->loadClass('textinput', 'htmlelements'); $this->loadClass('button', 'htmlelements'); $this->loadClass('form', 'htmlelements'); $this->loadClass('htmlheading', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $form = new form('elearnlogin', $this->uri(array('action' => 'login'), 'security')); $label = new label($this->objLanguage->languageText('word_username', 'system', 'Username') . ':', 'username'); $form->addToForm($label->show()); $username = new textinput('username'); $form->addToForm('<br />' . $username->show()); $label = new label($this->objLanguage->languageText('word_password', 'system', 'Password') . ':', 'username'); $form->addToForm('<br />' . $label->show()); $password = new textinput('password'); $password->fldType = 'password'; $form->addToForm('<br />' . $password->show()); $button = new button('login', $this->objLanguage->languageText('word_login', 'system', 'Login')); $button->setToSubmit(); $form->addToForm('<br />' . $button->show()); $str = $form->show(); $str .= '<hr />'; if ($this->objSysConfig->getValue('elearnlogin_forgotpassword', 'security', 'true') === 'true') { // JOC [[ Forgot your password OK $header = new htmlheading(); $header->type = 5; $header->str = $this->objLanguage->languageText('mod_security_forgotyourpassword', 'security', 'Forgot your password') . '?'; $str .= $header->show(); // JOC [[ Yes, help me login OK $link = new link($this->uri(array('action' => 'needpassword')), 'security'); $link->link = $this->objLanguage->languageText('mod_security_helpmelogin', 'security', 'Yes, help me login'); $str .= '<p>' . $link->show() . '</p>'; } return $str; }
$validCanvases = array_map('basename', glob('usrfiles/context/' . $this->objContext->getContextCode() . '/canvases/*', GLOB_ONLYDIR)); $canvas = new dropdown('canvas'); //$status->setBreakSpace('<br />'); $canvas->addOption('None', 'None'); foreach ($validCanvases as $validCanvas) { $canvas->addOption($validCanvas, $validCanvas); } //$canvas->size = 50; if ($mode == 'add' && is_array($fixup)) { $canvas->setSelected($fixup['canvas']); } else { if ($mode == 'edit') { $canvas->setSelected($context['canvas']); } } $canvasLabel = new label($this->objLanguage->languageText('mod_contextadmin_theme', 'contextadmin', 'Theme'), 'input_canvas'); $status = new dropdown('status'); //$status->setBreakSpace('<br />'); $status->addOption('Published', $this->objLanguage->languageText('word_published', 'system', 'Published')); $status->addOption('Unpublished', $this->objLanguage->languageText('word_unpublished', 'system', 'Unpublished')); if ($mode == 'add' && is_array($fixup)) { $status->setSelected($fixup['status']); } else { if ($mode == 'edit') { $status->setSelected($context['status']); } } //$access = new hiddeninput('access', 'Private'); //} else { if ($objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'false') { $access = new radio('access');
protected function build() { $sql = $this->get_par('datasource-sql'); if (empty($sql)) { die('[ERROR] - Multibox ' . $this->id . ' - query builder assente'); } $sql = $this->replacePlaceholder($sql); $res = $this->db->exec_query($sql, null, 'ASSOC'); //die($sql); if (empty($res)) { return; } $mlt_tbl = $this->add(tag::create('table')); $val_from_db = array_key_exists($this->id, $_REQUEST) && is_array($_REQUEST[$this->id]) ? false : true; foreach ($res as $k => $cmp_raw) { if ($val_from_db) { $_REQUEST[$this->id][$cmp_raw['id']] = $cmp_raw['val']; } $mlt_row = $mlt_tbl->add(tag::create('tr')); $cmp = $lbl = null; if (strlen($this->readonly) > 4) { $this->readonly = HelperOsy::exec_string(null, 'return ' . $this->readonly . ';'); } if ($this->readonly) { $cmp = tag::create('span'); if ($cmp_raw['typ'] == 'CMB') { $cmp_raw['val'] = label::getFromDatasource($cmp_raw['val'], $cmp_raw['sql_qry'], $this->db); } $cmp->add($cmp_raw['val']); } else { $is_req = $cmp_raw['is_req']; $cmp_nam = "{$this->id}[{$cmp_raw['id']}]"; switch ($cmp_raw['typ']) { case 'DAT': $cmp = new DateBox($cmp_nam); $cmp->par('date-format', 'dd/mm/yyyy'); break; case 'TXT': case 'NUM': $cmp = new TextBox($cmp_nam); if ($cmp_raw['typ'] == 'NUM') { $cmp->att('class', 'numeric', true); } else { $cmp->att('class', 'text', true); } break; case 'CMB': $cmp = new ComboBox($cmp_nam); //echo $cmp_raw['sql_qry']; $cmp->par('datasource-sql', HelperOsy::replaceVariable($cmp_raw['sql_qry'])); break; } $cmp->att('label', $cmp_raw['nam']); if (!empty($is_req)) { $lbl = '(*) '; $cmp->att('class', 'is-request', true); } } if (!is_null($cmp)) { $lbl = "<label class=\"multibox\">{$lbl}{$cmp_raw['nam']}</label>"; $mlt_row->add(new Tag('td'))->add($lbl); $mlt_row->add(new Tag('td'))->add($cmp); } } }
} else { echo '<h1>Forgot your Password</h1>'; } echo '<p>' . $this->objLanguage->languageText('mod_security_forgotpasswordprocess', 'security', 'If you have forgotten your password, please complete the form below. We will generate a NEW password for you to use, and send it to your email address.') . '</p>'; $this->loadClass('form', 'htmlelements'); $this->loadClass('textinput', 'htmlelements'); $this->loadClass('label', 'htmlelements'); $this->loadClass('button', 'htmlelements'); $form = new form('requestpassword', $this->uri(array('action' => 'needpasswordconfirm'))); $username = new textinput('request_username'); $usernameLabel = new label($this->objLanguage->languageText('word_username'), 'input_request_username'); $email = new textinput('request_email'); $emailLabel = new label($this->objLanguage->languageText('phrase_emailaddress'), 'input_request_email'); $objCaptcha = $this->getObject('captcha', 'utilities'); $captcha = new textinput('request_captcha'); $captchaLabel = new label($this->objLanguage->languageText('phrase_verifyrequest', 'security', 'Verify Request'), 'input_request_captcha'); $table = $this->newObject('htmltable', 'htmlelements'); $table->startRow(); $table->addCell($usernameLabel->show(), 100); $table->addCell($username->show()); $table->endRow(); $table->startRow(); $table->addCell($emailLabel->show()); $table->addCell($email->show()); $table->endRow(); $table->startRow(); $table->addCell(' '); $table->addCell(' '); $table->endRow(); $table->startRow(); $redrawButton = new button('redraw', 'Redraw', 'redraw();');
default: break; case 'nofoldernameprovided': $folderContent .= '<span class="error">' . $this->objLanguage->languageText('mod_filemanager_folderwasnotcreatednoname', 'filemanager', 'Folder was not created. No name provided') . '</span>'; break; case 'illegalcharacters': $folderContent .= '<span class="error">' . $this->objLanguage->languageText('mod_filemanager_folderwasnotcreatedillegalchars', 'filemanager', 'Folder was not created. Folders cannot contain any of the following characters') . ': \\ / : * ? " < > |</span>'; break; } echo '<h1>' . $folderpath . '</h1>'; $folderActions = ""; if ($folder['folderlevel'] != 2 && $folderPermission) { $form = new form('formrenamefolder', $this->uri(array('action' => 'renamefolder'))); $objInputFolder = new hiddeninput('folder', $folderId); $form->addToForm($objInputFolder->show()); $label = new label($this->objLanguage->languageText('mod_filemanager_nameoffolder', 'filemanager') . ': ', 'input_foldername'); $textinput = new textinput('foldername', $folderpath); $form->addToForm($label->show() . $textinput->show()); $buttonSubmit = new button('renamefoldersubmit', $this->objLanguage->languageText('mod_filemanager_renamefolder', 'filemanager')); $buttonSubmit->setToSubmit(); $form->addToForm(' ' . $buttonSubmit->show() . '<br/><div class="warning">' . $this->objLanguage->languageText('mod_filemanager_renamewarning', 'filemanager') . '</div>'); $fieldset = new fieldset(); $fieldset->setLegend($this->objLanguage->languageText('mod_filemanager_renamefolder', 'filemanager')); //$folderId $fieldset->addContent($form->show()); $folderActions .= '<span id="renamefolder" style="display: xnone;">' . $fieldset->show() . '<br /></span>'; $objAccess = $this->getObject("folderaccess", "filemanager"); $accessContent = $objAccess->createAccessControlForm($folder['id']); $folderActions .= '<span id="accessfolder" >' . $accessContent . '<br /></span>'; $alertContent = $objAccess->createAlertsForm($folder['id']); $folderActions .= '<span id="alertsfolder" >' . $alertContent . '<br /></span>';
protected function backup_course_sections($details) { foreach ($details->sections as $key => $section) { $included = $key . '_included'; if (!$section->settings[$included]) { continue; } $userinfo = $key . '_userinfo'; if ($section->settings[$userinfo]) { $userinfo = label::yes(); } else { $userinfo = label::no(); } $form_section = $this->backup_detail_item('includeuserinfo', $userinfo); $table = null; foreach ($details->activities as $activitykey => $activity) { if ($activity->sectionid != $section->sectionid) { continue; } if (empty($table)) { $table = new html_table(); $table->head = array('Module', 'Title', 'Userinfo'); //TODO: the above aren't translateable, see MDL-37211 $table->colclasses = array('modulename', 'moduletitle', 'userinfoincluded'); $table->align = array('left', 'left', 'center'); $table->attributes = array('class' => 'table table-striped'); $table->data = array(); } $name = get_string('pluginname', $activity->modulename); $icon = new pix_icon('icon', $name, $activity->modulename); $table->data[] = array($this->output->render($icon) . ' ' . $name, $activity->title, $activity->settings[$activitykey . '_userinfo'] ? label::yes() : label::no()); } if (!empty($table)) { $form_section .= form::row(get_string('sectionactivities', 'backup'), html_writer::table($table)); } $out[] = form::section(get_string('backupcoursesection', 'backup', $section->title), $form_section); } return implode($out); }
} if ($howcreated == 'LDAP') { $textinput->extra .= ' disabled="disabled"'; $passMsg = '<span id="leaveblank" style="display:none;">' . $leaveblank . '</span>'; $ldapMsg = '<span id="ldappass">' . $ldappass . '</span>'; } else { $passMsg = '<span id="leaveblank">' . $leaveblank . '</span>'; $ldapMsg = '<span id="ldappass" style="display:none;">' . $ldappass . '</span>'; } $table->addCell($label->show()); $table->addCell(' '); $table->addCell($textinput->show() . ' - ' . $passMsg . $ldapMsg); $table->endRow(); // Repeat Password $table->startRow(); $label = new label('Repeat Password', 'input_useradmin_repeatpassword'); $textinput = new textinput('useradmin_repeatpassword'); $textinput->fldType = 'password'; $textinput->size = 15; $textinput->extra = ' autocomplete="off"'; if ($howcreated == 'LDAP') { $textinput->extra .= ' disabled="disabled"'; } $table->addCell($label->show()); $table->addCell(' '); $table->addCell($textinput->show()); $table->endRow(); $form->addToForm($table->show()); $button = new button('submitform', $this->objLanguage->languageText('mod_useradmin_updatedetails', 'useradmin', 'Update Details')); $button->setToSubmit(); // $button->setOnClick('validateForm()');
$cadd = $this->newObject('htmltable', 'htmlelements'); $cadd->cellpadding = 3; //IP textfield $cadd->startRow(); $ciplabel = new label($this->objLanguage->languageText('mod_cache_ip', 'cache') . ':', 'input_ip'); $ip = new textinput('ip'); $ip->extra = ' style="width:50%;" '; if (isset($cache['ip'])) { $ip->setValue(htmlentities($cache['ip'], ENT_QUOTES)); } $cadd->addCell($ciplabel->show()); $cadd->addCell($ip->show()); $cadd->endRow(); //Port $cadd->startRow(); $plabel = new label($this->objLanguage->languageText('mod_cache_port', 'cache') . ':', 'input_port'); $port = new textinput('port'); $port->extra = ' style="width:50%;" '; if (isset($cache['port'])) { $port->setValue($cache['port']); } $cadd->addCell($plabel->show()); $cadd->addCell($port->show()); $cadd->endRow(); //end off the form and add the buttons $this->objCButton = new button($this->objLanguage->languageText('word_save', 'system')); $this->objCButton->setValue($this->objLanguage->languageText('word_save', 'system')); $this->objCButton->setToSubmit(); $cfieldset->addContent($cadd->show()); $cform->addToForm($cfieldset->show()); $cform->addToForm($this->objCButton->show());
// email $table->startRow(); $friendemail = new textinput('friend_email'); $friendemailLabel = new label($this->objLanguage->languageText('friendemail', 'userregistration') . ' ', 'input_friendemail'); $table->addCell($friendemailLabel->show(), 150, NULL, 'right'); $table->addCell(' ', 5); $table->addCell($friendemail->show() . $required); $table->endRow(); // message to include to mate $defmsg = $this->objLanguage->languageText("mod_userregistration_wordhi", "userregistration") . ", <br /><br /> " . $this->objUser->username() . " " . $this->objLanguage->languageText("mod_userregistration_hasinvited", "userregistration") . " " . $this->objConfig->getSiteName() . "! <br /><br /> " . $this->objLanguage->languageText("mod_userregistration_pleaseclick", "userregistration") . "<br />"; $table->startRow(); $friendmsg = $this->newObject('htmlarea', 'htmlelements'); $friendmsg->name = 'friend_msg'; $friendmsg->value = $defmsg; $friendmsg->width = '50%'; $friendmsgLabel = new label($this->objLanguage->languageText('friendmessage', 'userregistration') . ' ', 'input_friendmsg'); $table->addCell($friendmsgLabel->show(), 150, NULL, 'right'); $table->addCell(' ', 5); $friendmsg->toolbarSet = 'simple'; $table->addCell($friendmsg->show()); $table->endRow(); $fieldset = $this->newObject('fieldset', 'htmlelements'); $fieldset->legend = ''; // $this->objLanguage->languageText('phrase_invitefriend', 'userregistration'); $fieldset->contents = $table->show(); // add the form to the fieldset $form->addToForm($fieldset->show()); $button = new button('submitform', $this->objLanguage->languageText("mod_userregistration_completeinvite", "userregistration")); $button->setToSubmit(); $form->addToForm('<p align="center"><br />' . $button->show() . '</p>'); $middleColumnContent .= $form->show();
$table->addCell($objCountries->countryAlpha()); } $table->endRow(); $fieldset = $this->newObject('fieldset', 'htmlelements'); $fieldset->legend = $this->objLanguage->languageText('phrase_userdetails', 'userregistration', 'User Details'); $fieldset->contents = $table->show(); $form->addToForm($fieldset->show()); $form->addToForm('<br />'); // Email Address $table = $this->newObject('htmltable', 'htmlelements'); $table->startRow(); $email = new textinput('register_email'); $emailLabel = new label($this->objLanguage->languageText('word_email', 'system', 'Email'), 'input_register_email'); $confirmEmail = new textinput('register_confirmemail'); $confirmEmailLabel = new label($this->objLanguage->languageText('phrase_confirmemail', 'system', 'Confirm Email'), 'input_register_confirmemail'); $emailInfoLabel = new label('Please Enter a Valid Email Address', 'input_register_email'); if ($mode == 'addfixup') { $email->value = $this->getParam('register_email'); $confirmEmail->value = $this->getParam('register_confirmemail'); } if (isset($userstring[2]) && $mode == 'add') { $email->value = $userstring[2]; $confirmEmail->value = $userstring[2]; } $table->addCell($emailInfoLabel->show(), 150, NULL, 'right'); $table->addCell(' ', 10); $table->addCell($emailLabel->show() . $required . '<br />' . $email->show(), '20%'); $table->addCell($confirmEmailLabel->show() . $required . '<br />' . $confirmEmail->show()); $table->endRow(); $fieldset = $this->newObject('fieldset', 'htmlelements'); $fieldset->legend = $this->objLanguage->languageText('phrase_emailaddress', 'system', 'Email Address');
$groupDropdown->addOption('all', 'All groups'); $groups = array("Lecturers", "Students", "Guest"); for ($i = 0; $i < count($groups); $i++) { $groupDropdown->addOption($groups[$i], $groups[$i]); } $groupDropdown->setSelected($group); $table->addCell($label2->show() . $groupDropdown->show() . " " . $label->show() . $courseDropdown->show()); $table->endRow(); //Ehb-added-End $table->startRow(); $orderLabel = new label($this->objLanguage->languageText('mod_contextgroups_orderresultsby', 'contextgroups') . ': ', 'input_order'); $searchdropdown->name = 'order'; $searchdropdown->cssId = 'input_order'; $searchdropdown->setSelected($order); //$table->addCell($orderLabel->show().$searchdropdown->show()); $label = new label($this->objLanguage->languageText('mod_contextgroups_noofresults', 'contextgroups') . ': ', 'input_results'); $dropdown = new dropdown('results'); $dropdown->addOption('20', '20'); $dropdown->addOption('30', '30'); $dropdown->addOption('50', '50'); $dropdown->addOption('75', '75'); $dropdown->addOption('100', '100'); //$dropdown->addOption('all', 'All Results'); $dropdown->setSelected($numresults); $table->addCell($orderLabel->show() . $searchdropdown->show() . " " . $label->show() . $dropdown->show()); $table->endRow(); $button = new button('searchbutton'); $button->value = $this->objLanguage->languageText('word_search'); $button->setToSubmit(); $table->addCell($button->show()); $table->addCell(' ');
/** * Short description for function * * Long description (if any) ... * * @param unknown $folderId Parameter description (if any) ... * @return object Return description (if any) ... * @access public */ function showCreateFolderForm($folderId) { $folderPath = $this->getFolderPath($folderId); if ($folderPath == FALSE) { return ''; } $folderParts = explode('/', $folderPath); $form = new form('createfolder', $this->uri(array('action' => 'createfolder'))); $label = new label('Create a subfolder in: ', 'input_parentfolder'); $form->addToForm($label->show() . '<br/>' . $this->getTree($folderParts[0], $folderParts[1], 'htmldropdown', $folderId)); $textinput = new textinput('foldername'); $label = new label('Name of Folder: ', 'input_foldername'); $form->addToForm('<br/>' . $label->show() . '<br/>' . $textinput->show() . ' '); $button = new button('create', 'Create Folder'); $button->setToSubmit(); $form->addToForm('<br/>' . $button->show()); return $form->show(); }
//Set the value of the element to $pname if (isset($pname)) { $objElement->setValue($pname); } $txtToShow = $objElement->show() . $pname; } else { // We are adding. if (isset($pname)) { $objElement->setValue($pname); } $txtToShow = $objElement->show(); } //Add the $pname element to the form $objForm->addToForm($pnameLabel->show() . ": " . $txtToShow . "<br />"); //Create label for the input of ptag $ptagLabel = new label($this->objLanguage->languageText("mod_userparamsadmin_pvalue", 'userparamsadmin'), "input_ptag"); //Create an element for the input of ptag $objElement = new textinput("ptag"); //Set the value of the element to $ptag if (isset($ptag)) { $objElement->setValue($ptag); } //Add the $ptag element to the form $objForm->addToForm($ptagLabel->show() . ": " . $objElement->show() . "<br />"); $commaWarn = "<div class='warning'>" . $this->objLanguage->languageText("mod_userparams_nocommas", 'userparamsadmin') . "</div>"; $objForm->addToForm($commaWarn); // Create an instance of the button object $this->loadClass('button', 'htmlelements'); // Create a submit button $objElement = new button('submit'); $objElement->setIconClass("save");
foreach ($condition->objConditionType->getAll() as $option) { $ddbType->addOption($option['name'], $option['name']); } $ddbType->setSelected($condition->_function); $ddbType->extra = 'onChange="javascript:document.frmCond[\'button\'].value=\'save\';document.frmCond.submit();"'; $lnkSave = $this->newObject('link', 'htmlelements'); $lnkSave->href = "#"; $lnkSave->extra = 'onclick="javascript:document.frmCond[\'button\'].value=\'save\';document.frmCond.submit();"'; $lnkSave->link = $this->objLanguage->languageText("word_save"); $lnkBack = $this->newObject('link', 'htmlelements'); $lnkBack->href = '#'; $lnkBack->extra = 'onclick="javascript:document.frmCond[\'button\'].value=\'cancel\';document.frmCond.submit();"'; $lnkBack->link = $this->objLanguage->languageText("word_back"); $arrControls = array($lnkSave->show(), $lnkBack->show()); $lblConditionType = $this->objLanguage->code2Txt('mod_contextpermissions_lblConditionType', 'contextpermissions'); $objLabel = new label($lblConditionType, 'input_type'); $lblType = $objLabel->show(); $frmCond = $this->newObject('form', 'htmlelements'); $frmCond->name = 'frmCond'; $frmCond->displayType = '3'; $frmCond->action = $this->uri(array('action' => 'condition_form')); $frmCond->addToForm("<input type=hidden name=button value=''>\n"); $frmCond->addToForm("<input type=hidden name=id value={$id}>\n"); $frmCond->addToForm("<DIV id=blog-content>\n"); $frmCond->addToForm(" <DIV id=formline>\n"); $frmCond->addToForm(" <DIV id=formlabel>{$lblType}</DIV>\n"); $frmCond->addToForm(" <DIV id=formelement>" . $ddbType->show() . "</DIV>\n"); $frmCond->addToForm(" </DIV>\n"); $frmCond->addToForm(" <DIV id=formline>\n"); $frmCond->addToForm(" <DIV id=formlabel>{$lblName}</DIV>\n"); $frmCond->addToForm(" <DIV id=formelement>{$element}</DIV>\n");
$selectModuleLabel = $this->objLanguage->languageText('mod_contextcontent_selectmodule', 'contextcontent', "Select module"); /* * ** start date & time *** */ // Set start date of test $startField = $objPopupcal->show('startdate', 'yes', 'no', strftime('%Y-%m-%d %H:%M:%S', mktime())); $objLabel = new label($startLabel . ':', 'input_start'); $objTable->startRow(); $objTable->addCell($objLabel->show()); $objTable->addCell($startField); $objTable->endRow(); //$objTable->addRow(array( // $objLabel->show(), // $startField //)); // Set closing date of test $closeField = $objPopupcal->show('enddate', 'yes', 'no', strftime('%Y-%m-%d %H:%M:%S', mktime())); $objLabel = new label($closeLabel . ':', 'input_close'); /*$objTable->addRow(array( $objLabel->show(), $closeField )); */ $objTable->startRow(); $objTable->addCell($objLabel->show()); $objTable->addCell($closeField); $objTable->endRow(); /* $objElement = new checkbox('studentsonly', '', true); // this will checked $check = $objElement->show(); $objTable->addRow(array( $userOptLabel, $check
private function create_node_course_modules_mod() { $labels = new label(); $resources = new resource(); $forums = new forum(); $quiz = new quiz(); self::log_action('Creating node: COURSE/MODULES/MOD'); // LABELS $node_course_modules_mod_label = $labels->generate_node(); // RESOURCES (WEB CONTENT AND WEB LINK) $node_course_modules_mod_resource = $resources->generate_node(); // FORUMS $node_course_modules_mod_forum = $forums->generate_node(); // QUIZ $node_course_modules_mod_quiz = $quiz->generate_node_course_modules_mod(); $node_course_modules = $node_course_modules_mod_label . $node_course_modules_mod_resource . $node_course_modules_mod_forum . $node_course_modules_mod_quiz; return $node_course_modules; }
//Set the field type to hidden for the primary key $objElement->fldType = "hidden"; //Add the hidden PK field to the form $objForm->addToForm($objElement->show()); //Create label for input of category $catLabel = new label($this->objLanguage->languageText("word_category"), "input_category"); //Create an element for the input of category $objCat = new textinput("category"); $catMiss = $this->objLanguage->languageText('mod_storycategory_catmiss', "storycategoryadmin"); $objForm->addRule('category', $catMiss, 'required'); //Set the value of the element to $category if (isset($category)) { $objCat->setValue($category); } //Create label for the input of title $titLabel = new label($this->objLanguage->languageText("word_title"), "input_title"); //Create an element for the input of title $objTit = new textinput("title"); $titMiss = $this->objLanguage->languageText('mod_storycategory_titmiss', "storycategoryadmin"); $objForm->addRule('title', $titMiss, 'required'); //Set the width $objTit->size = 70; //Set the value of the element to $title if (isset($title)) { $objTit->setValue($title); } //Create an instance of the fieldset object $objFieldset = $this->getObject('fieldset', 'htmlelements'); $objFieldset->legend = $fieldsetLabel; $objFieldset->contents = "<table><tr><td align=\"right\">" . $catLabel->show() . ": </td><td>" . $objCat->show() . "</td></tr>" . "<tr><td align=\"right\">" . $titLabel->show() . ": </td><td>" . $objTit->show() . "</td></tr></table>"; //Add the fieldset to the form
/** * * Render a login box * * @param string $module The module we are in or will go to * @param boolean $ajaxLogin Whether or not to do ajax login * @return string The login box * @access public * */ public function renderLoginBox($module = NULL, $ajaxLogin = FALSE) { try { // Determine if we need to use https $useHTTPS = $this->objSysConfig->getValue('MOD_SECURITY_HTTPS', 'security'); // Set the formaction depending on whether it is going to use ajax or not. if (!$ajaxLogin) { // Set the action for the login form depending on if there is a module or not. if ($module != NULL) { $formAction = $this->uri(array('action' => 'login', 'mod' => $module), 'security'); } else { $formAction = $this->uri(array('action' => 'login'), 'login'); } if ($useHTTPS == '1' || $useHTTPS == 'TRUE') { $formAction = str_replace("http:", "https:", $formAction); } } else { // We want an ajax login. $formAction = 'javascript:void(0);'; } // Create a Form object. $objForm = new form('loginform', $formAction); $objFields = new fieldset(); $objFields->setLegend(' '); //--Create an element for the username $objInput = new textinput('username', '', 'text', '15'); $objInput->extra = 'maxlength="255"'; $objInput->setCss('required minlength(2)'); $objLabel = new label($this->objLanguage->languageText('word_username') . ': ', 'input_username'); //Add the username box to the form $objFields->addContent($objLabel->show() . '<br />'); $objFields->addContent($objInput->show() . '<br />'); //--- Create an element for the password $objInput = new textinput('password', '', 'password', '15'); $objInput->extra = 'maxlength="255"'; $objInput->setCss('required'); $objLabel = new label($this->objLanguage->languageText('word_password') . ': ', 'input_password'); $objFields->addContent($objLabel->show() . '<br />'); $objFields->addContent($objInput->show()); //--- Create an element for the network login radio $objElement = new checkbox("useLdap"); $objElement->setCSS("transparentbgnb"); $objElement->label = $this->objLanguage->languageText("phrase_networkid") . ' '; $ldap = ''; $objSysConfig = $this->getObject('dbsysconfig', 'sysconfig'); $showLDAPCheckBox = $objSysConfig->getValue('show_ldap_checkbox', 'security'); // Get a nonce $objNonce = $this->getObject('nonce', 'login'); $nonce = $objNonce->storeNonce(); // Create a hidden field for the nonce $objNonce = new hiddeninput('nonce', $nonce); $objNonce->extra = ' id=\'nonce\''; $nonce = $objNonce->show(); //----------------------------------------------------------------------------------------Checking this is a violation of the principle of chain of responsiblity @todo fix it if ($this->objConfig->getuseLDAP() && $showLDAPCheckBox == 'true') { $ldap .= $objElement->label . ' ' . $objElement->show(); } //--- Create an element for the remember me checkbox $objRElement = new checkbox("remember"); $objRElement->setCSS("transparentbgnb noborder"); $objRElement->label = $this->objLanguage->languageText("phrase_rememberme", "security"); $rem = $objRElement->show() . "<br />"; //--- Create a submit button $objButton = new button('submit', $this->objLanguage->languageText("word_login")); // Add the login icon $objButton->setIconClass("user"); // Set the button type to submit $objButton->setToSubmit(); // Give the button an ID for jQuery to grab. $objButton->setId('loginButton'); // Add the button to the form ----------------------------------------------------------- Note LDAP breaks the COR pattern $objFields->addContent($ldap . '<br />' . $nonce . $rem . "<div class='loginbuttonwrap'>" . $objButton->show() . '</div>'); $helpText = strtoupper($this->objLanguage->languageText('word_help', 'system')); $helpIcon = $this->objHelp->show('register', 'useradmin', $helpText); $resetLink = new Link($this->uri(array('action' => 'needpassword'), 'security')); $resetLink->link = $this->objLanguage->languageText('mod_security_forgotpassword'); // the help link $p = '<br/>' . $resetLink->show() . '<br />' . $helpIcon; $objFields->addContent($p); $objForm->addToForm($objFields->show()); return '<div id="login_block_wrapper">' . $objForm->show() . '</div>'; } catch (Exception $e) { customException::cleanUp(); } }