/** * Class UIHTMLEditorWidget * UI wdiget for displaying and editing one-way encrypted passwords * * @author Phil Eddies * @copyright Copyright (C) 2010-2012 Combodo SARL * @license http://opensource.org/licenses/AGPL-3.0 */ class UIHTMLEditorWidget { protected $m_iId; protected $m_sAttCode; protected $m_sNameSuffix; protected $m_sFieldPrefix; protected $m_sHelpText; protected $m_sValidationField; protected $m_sValue; protected $m_sMandatory; public function __construct($iInputId, $sAttCode, $sNameSuffix, $sFieldPrefix, $sHelpText, $sValidationField, $sValue, $sMandatory) { $this->m_iId = $iInputId; $this->m_sAttCode = $sAttCode; $this->m_sNameSuffix = $sNameSuffix; $this->m_sHelpText = $sHelpText; $this->m_sValidationField = $sValidationField; $this->m_sValue = $sValue; $this->m_sMandatory = $sMandatory; $this->m_sFieldPrefix = $sFieldPrefix; } /** * Get the HTML fragment corresponding to the HTML editor widget * @param WebPage $oP The web page used for all the output * @param Hash $aArgs Extra context arguments * @return string The HTML fragment to be inserted into the page */ public function Display(WebPage $oPage, $aArgs = array()) { $iId = $this->m_iId; $sCode = $this->m_sAttCode.$this->m_sNameSuffix; $sValue = $this->m_sValue; $sHelpText = $this->m_sHelpText; $sValidationField = $this->m_sValidationField; $sHtmlValue = "
$sValidationField |