public function getHtml($error = null)
    {
        $captcha_url = wa()->getRootUrl(false, true) . $this->getAppId() . '/captcha.php?rid=' . uniqid(time());
        $refresh = _ws("Refresh CAPTCHA");
        $class = $error ? ' wa-error' : '';
        return <<<HTML
<div class="wa-captcha">
    <p>
        <img class="wa-captcha-img" src="{$captcha_url}" alt="CAPTCHA" title="{$refresh}">
        <strong>&rarr;</strong>
        <input type="text" name="captcha" class="wa-captcha-input{$class}" autocomplete="off">
    </p>
    <p>
        <a href="#" class="wa-captcha-refresh">{$refresh}</a>
    </p>
    <script type="text/javascript">
    \$(function() {
        \$('div.wa-captcha .wa-captcha-refresh, div.wa-captcha .wa-captcha-img').click(function(){
            var div = \$(this).parents('div.wa-captcha');
            var captcha = div.find('.wa-captcha-img');
            if(captcha.length) {
                captcha.attr('src', captcha.attr('src').replace(/\\?.*\$/,'?rid='+Math.random()));
                captcha.one('load', function() {
                    div.find('.wa-captcha-input').focus();
                });
            };
            return false;
        });
    });
    </script>
</div>
HTML;
    }
 public function execute()
 {
     if (!$this->getUser()->getRights('shop', 'settings')) {
         throw new waException(_w('Access denied'));
     }
     $plugin_id = waRequest::get('id');
     if (!$plugin_id) {
         throw new waException(_ws("Can't save plugin settings: unknown plugin id"));
     }
     $namespace = 'shop_' . $plugin_id;
     /**
      * @var shopPlugin $plugin
      */
     $plugin = waSystem::getInstance()->getPlugin($plugin_id);
     $settings = (array) $this->getRequest()->post($namespace);
     $files = waRequest::file($namespace);
     $settings_defenitions = $plugin->getSettings();
     foreach ($files as $name => $file) {
         if (isset($settings_defenitions[$name])) {
             $settings[$name] = $file;
         }
     }
     try {
         $this->response = $plugin->saveSettings($settings);
         $this->response['message'] = _w('Saved');
     } catch (Exception $e) {
         $this->setError($e->getMessage());
     }
 }
 public function execute()
 {
     $e = $this->getRequest()->param('exception');
     if ($e && $e instanceof Exception) {
         /**
          * @var Exception $e
          */
         $code = $e->getCode();
         if (!$code) {
             $code = 500;
         }
         $message = $e->getMessage();
     } else {
         $code = 404;
         $message = _ws("Page not found");
     }
     $this->getResponse()->setStatus($code);
     $this->getResponse()->setTitle(htmlentities($code . '. ' . $message, ENT_QUOTES, 'utf-8'));
     $this->view->assign('error_code', $code);
     $this->view->assign('error_message', $message);
     if ($code == 404) {
         $this->setLayout(new blogFrontendLayout());
     }
     $this->setThemeTemplate('error.html', waRequest::param('theme', 'default'));
 }
 public function execute()
 {
     parent::execute();
     $this->view->assign('my_nav_selected', 'profile');
     $user = wa()->getUser();
     $user_info = array();
     foreach ($this->form->fields as $id => $field) {
         if (!in_array($id, array('password', 'password_confirm'))) {
             if ($id === 'photo') {
                 $user_info[$id] = array('name' => _ws('Photo'), 'value' => '<img src="' . $user->getPhoto() . '">');
             } else {
                 $user_info[$id] = array('name' => $this->form->fields[$id]->getName(null, true), 'value' => $user->get($id, 'html'));
             }
         }
     }
     $this->view->assign('user_info', $user_info);
     // Set up layout and template from theme
     $this->setThemeTemplate('my.profile.html');
     if (!waRequest::isXMLHttpRequest()) {
         $this->setLayout(new photosDefaultFrontendLayout());
         $this->getResponse()->setTitle(_w('My account') . ' — ' . _w('My profile'));
         $this->layout->assign('breadcrumbs', $this->getBreadcrumbs());
         $this->layout->assign('nofollow', true);
     }
 }
 public function execute()
 {
     if (!$this->appSettings('show_comments', true)) {
         throw new waException(_ws("Page not found"), 404);
     }
     $this->comment_model = new blogCommentModel();
     $this->blog_id = waRequest::param('blog_id', false, waRequest::TYPE_ARRAY_INT);
     $this->verify();
     if ($this->getRequest()->method() == 'post') {
         $res = $this->addComment();
     } else {
         $this->comment_id = waRequest::param('blog_id', false, waRequest::TYPE_ARRAY_INT);
         $res = true;
     }
     if (waRequest::get('json')) {
         if ($this->comment_id) {
             $this->displayComment();
         }
     } else {
         if (!$res) {
             var_export($this->errors);
             exit;
             //handle error on non ajax
         }
         $url = blogPost::getUrl($this->post) . '#comment' . intval($this->parent_id ? $this->parent_id : $this->comment_id);
         $this->redirect($url);
     }
 }
 public function saveAction()
 {
     $plugin_id = waRequest::get('id');
     if (!$plugin_id) {
         throw new waException(_ws("Can't save plugin settings: unknown plugin id"));
     }
     $namespace = $this->getAppId() . '_' . $plugin_id;
     /**
      * @var shopPlugin $plugin
      */
     $plugin = waSystem::getInstance()->getPlugin($plugin_id);
     $settings = (array) $this->getRequest()->post($namespace);
     $files = waRequest::file($namespace);
     $settings_defenitions = $plugin->getSettings();
     foreach ($files as $name => $file) {
         if (isset($settings_defenitions[$name])) {
             $settings[$name] = $file;
         }
     }
     try {
         $response = $plugin->saveSettings($settings);
         $response['message'] = _w('Saved');
         $this->displayJson($response);
     } catch (Exception $e) {
         $this->setError($e->getMessage());
         $this->displayJson(array(), $e->getMessage());
     }
 }
 public function execute()
 {
     // Layout caching is forbidden
     header("Cache-Control: no-store, no-cache, must-revalidate");
     header("Expires: " . date("r"));
     $this->executeAction('sidebar', new contactsBackendSidebarAction());
     $fields = array();
     // normally this is done with waContactFields::getInfo() but we don't need most of the info
     // so we loop through fields manually.
     foreach (waContactFields::getAll('enabled') as $field_id => $f) {
         /**
          * @var $f waContactField
          */
         $fields[$field_id] = array();
         $fields[$field_id]['id'] = $field_id;
         $fields[$field_id]['name'] = $f->getName();
         $fields[$field_id]['fields'] = $f instanceof waContactCompositeField;
         if ($ext = $f->getParameter('ext')) {
             $fields[$field_id]['ext'] = $ext;
             foreach ($fields[$field_id]['ext'] as &$v) {
                 $v = _ws($v);
             }
         }
     }
     // Plugin assets
     if ($this->getConfig()->getInfo('edition') === 'full') {
         wa()->event('assets');
     }
     $this->view->assign('admin', wa()->getUser()->getRights('contacts', 'backend') > 1);
     $this->view->assign('global_admin', wa()->getUser()->getRights('webasyst', 'backend') > 0);
     $this->view->assign('fields', $fields);
     $this->view->assign('versionFull', $this->getConfig()->getInfo('edition') === 'full');
 }
 public function __construct()
 {
     // check access rights
     if (!$this->getRights('design')) {
         throw new waRightsException(_ws("Access denied"));
     }
 }
 public function init()
 {
     $this->addItem('upload', _w('Can upload photos and create new albums'));
     $this->addItem('edit', _w('Can edit and delete photos and albums uploaded by other users'));
     $this->addItem('pages', _ws('Can edit pages'));
     $this->addItem('design', _ws('Can edit design'));
 }
 public function init()
 {
     // Право удалять записи
     $this->addItem('delete', 'Can delete posts', 'checkbox');
     // Право редактировать дизайн (шаблоны и темы)
     $this->addItem('design', _ws('Can edit design'), 'checkbox');
 }
 public function execute()
 {
     $plugin_id = waRequest::get('id');
     if (!$plugin_id) {
         throw new waException(_ws("Can't save plugin settings: unknown plugin id"));
     }
     $namespace = 'photos_' . $plugin_id;
     /**
      * @var photosPlugin $plugin
      */
     $plugin = waSystem::getInstance()->getPlugin($plugin_id);
     $settings = (array) $this->getRequest()->post($namespace);
     $files = waRequest::file($namespace);
     $settings_defenitions = $plugin->getSettings();
     foreach ($files as $name => $file) {
         if (isset($settings_defenitions[$name])) {
             $settings[$name] = $file;
         }
     }
     try {
         $plugin->saveSettings($settings);
     } catch (Exception $e) {
         $this->errors = $e->getMessage();
     }
 }
Example #12
0
 public static function getDelimiters()
 {
     $result = array();
     foreach (self::$delimiters as $k => $d) {
         $result[$k] = array($d[0], _ws($d[1]));
     }
     return $result;
 }
 public function getMessage($name, $variables = array())
 {
     $message = isset($this->messages[$name]) ? $this->messages[$name] : _ws('Invalid');
     foreach ($variables as $k => $v) {
         $message = str_replace('%' . $k . '%', $v, $message);
     }
     return $message;
 }
 public function init()
 {
     if (!isset($this->options['validators'])) {
         $options = $this->options;
         $options['required'] = true;
         $this->options['validators'] = new waStringValidator($options, array('required' => _ws('At least one of these fields must be filled')));
     }
 }
 public function execute()
 {
     $filepath = wa()->getCachePath('plugins/discountcards/export-discountcards.csv', 'shop');
     if (!file_exists($filepath)) {
         throw new waException(_ws("Page not found"), 404);
     }
     waFiles::readFile($filepath, 'export-discountcards.csv');
 }
 public function format($data, $format = null)
 {
     $result = parent::format($data, $format);
     if (in_array('list', explode(',', $format))) {
         return $result ? _ws('Yes') : _ws('No');
     }
     return $result;
 }
 public function init()
 {
     // The right to delete records
     // Право удалять записи
     $this->addItem('delete', 'Can delete posts', 'checkbox');
     // The right to edit design (templates and themes)
     // Право редактировать дизайн (шаблоны и темы)
     $this->addItem('design', _ws('Can edit design'), 'checkbox');
 }
 public function validate($data, $contact_id = null)
 {
     if (!isset($this->options['validators'])) {
         $this->options['validators'] = array();
     }
     if ($this->getParameter('required') && !$this->options['validators']) {
         $this->options['validators'][] = new waStringValidator($this->options, array('required' => _ws('Select value')));
     }
     return parent::validate($data, $contact_id);
 }
 public function getInfo()
 {
     $data = parent::getInfo();
     $data['options'] = $this->getOptions();
     // In JS we cannot rely on the order of object properties during iteration
     // so we pass an order of keys as an array
     $data['oOrder'] = array_keys($data['options']);
     $data['defaultOption'] = _ws($this->getParameter('defaultOption'));
     return $data;
 }
Example #20
0
 public function execute()
 {
     $page = array();
     if ($id = waRequest::param('page_id')) {
         $page = $this->getPageModel()->get($id);
         foreach ($page as $k => $v) {
             if ($k != 'content' && $k != 'title') {
                 $page[$k] = htmlspecialchars($v);
             }
         }
     }
     if (!$page) {
         $this->getResponse()->setStatus(404);
         $this->getResponse()->setTitle('404. ' . _ws("Page not found"));
         $this->view->assign('error_code', 404);
         $this->view->assign('error_message', _ws("Page not found"));
         $this->setThemeTemplate('error.html');
     } else {
         $breadcrumbs = array();
         $parents = array();
         $p = $page;
         $root_url = wa()->getAppUrl(null, true);
         $root_page_id = $p['id'];
         while ($p['parent_id']) {
             $p = $this->getPageModel()->select('id, parent_id, name, title, url, full_url')->where("id = ?", $p['parent_id'])->fetch();
             $parents[] = $p;
             $breadcrumbs[] = array('name' => $p['name'], 'url' => $root_url . $p['full_url']);
             $root_page_id = $p['id'];
         }
         $this->view->assign('root_page_id', $root_page_id);
         if ($this->layout) {
             $this->layout->assign('root_page_id', $root_page_id);
         }
         $this->view->assign('page_parents', array_reverse($parents));
         if ($this->layout && $breadcrumbs) {
             $this->layout->assign('breadcrumbs', array_reverse($breadcrumbs));
         }
         $this->getResponse()->setTitle($page['title']);
         $this->getResponse()->setMeta(array('keywords' => isset($page['keywords']) ? $page['keywords'] : '', 'description' => isset($page['description']) ? $page['description'] : ''));
         $this->view->assign('page', $page);
         try {
             $this->view->assign('wa_theme_url', $this->getThemeUrl());
             $page['content'] = $this->view->fetch('string:' . $page['content']);
         } catch (SmartyCompilerException $e) {
             $message = preg_replace('/"[a-z0-9]{32,}"/', " of content Site page with id {$page['id']}", $e->getMessage());
             throw new SmartyCompilerException($message, $e->getCode());
         }
         if ($this->layout) {
             $this->layout->assign('page_id', $page['id']);
         }
         $this->view->assign('page', $page);
         $this->setThemeTemplate('page.html');
     }
 }
 public function customFields(waOrder $order)
 {
     $company_field = $this->cust_company ? $this->cust_company : 'company';
     $inn_field = $this->cust_inn ? $this->cust_inn : 'inn';
     $result = array('inn' => array('title' => 'ИНН', 'control_type' => waHtmlControl::INPUT), 'company' => array('title' => _ws('Company'), 'control_type' => waHtmlControl::INPUT));
     if ($company = $order->getContactField($company_field)) {
         $result['company']['value'] = $company;
     }
     if ($inn = $order->getContactField($inn_field)) {
         $result['inn']['value'] = $inn;
     }
     return $result;
 }
 public function execute()
 {
     $strings = array();
     // Application locale strings
     foreach (array('Please select at least one album', 'Please select at least one photo', 'Please select at least one tag', 'Please select at least two photos', 'Choose rate', 'add description', 'Private photo', 'Are you sure to delete photo?', 'Save', 'Photo downloaded by', 'Next →', '← Back', 'Cancel', 'clear', 'Plugins', 'Settings', 'add a tag', 'Files with extensions *.gif, *.jpg, *.jpeg, *.png are allowed only.', 'Close', 'Stop upload', 'Edit title...', 'Failed to upload. Most probably, there were not enough memory to create thumbnails.', 'Upload photos (%d)', 'Delete', 'Click “Save” button below to apply this change.', "You don't have sufficient access rights", 'subtitle', 'Saving', 'Saved', 'Pages', 'Empty result', 'This will reset all changes you applied to the image after upload, and will restore the image to its original. Are you sure?') as $s) {
         $strings[$s] = _w($s);
     }
     foreach (array('kB', 'MB', 'GB', 'TB', 'PB', 'EB') as $s) {
         $strings[$s] = _ws($s);
     }
     $this->view->assign('strings', $strings ? $strings : new stdClass());
     // stdClass is used to show {} instead of [] when there's no strings
     $this->getResponse()->addHeader('Content-Type', 'text/javascript; charset=utf-8');
 }
Example #23
0
 public function execute()
 {
     $strings = array();
     // Application locale strings
     foreach (array('File URL', 'Download', 'Rename', 'Move to folder', 'Delete', 'Delete file', 'File', 'will be deleted without the ability to recover.', 'Saving...', 'Saved', 'An error occurred while saving', 'Unsaved changes will be lost if you leave this page now. Are you sure?', 'Image will be uploaded into') as $s) {
         $strings[$s] = _w($s);
     }
     $strings['Disable this URL'] = _ws('Disable this URL');
     $strings['Enable this URL'] = _ws('Enable this URL');
     $strings['enable'] = _ws('enable');
     $strings['disable'] = _ws('disable');
     $strings['Save'] = _ws('Save');
     $this->view->assign('strings', $strings ? $strings : new stdClass());
     // stdClass is used to show {} instead of [] when there's no strings
     $this->getResponse()->addHeader('Content-Type', 'text/javascript; charset=utf-8');
 }
Example #24
0
 public function init()
 {
     $this->addItem('orders', _w('Can manage orders'));
     $this->addItem('settings', _w('Can manage settings'));
     $this->addItem('reports', _w('Can view reports'));
     $this->addItem('pages', _ws('Can edit pages'));
     $this->addItem('design', _ws('Can edit design'));
     $type_model = new shopTypeModel();
     $types = $type_model->getNames();
     $this->addItem('type', _w('Can manage products'), 'list', array('items' => $types, 'hint1' => 'all_checkbox'));
     /**
      * @event rights.config
      * @param waRightConfig $this Rights setup object
      * @return void
      */
     wa()->event('rights.config', $this);
 }
 /**
  * @param string $code
  * @param string $error
  * @return bool
  */
 public function isValid($code = null, &$error = '')
 {
     if ($code === null) {
         $code = waRequest::post('captcha');
     }
     $code = strtolower(trim($code));
     $captcha = wa()->getStorage()->get('captcha');
     $app_id = $this->getAppId();
     if (isset($captcha[$app_id]) && $captcha[$app_id] === $code) {
         unset($captcha[$app_id]);
         wa()->getStorage()->set('captcha', $captcha);
         return true;
     } else {
         $error = _ws('Invalid captcha');
         return false;
     }
 }
 public function format($data)
 {
     if (is_array($data)) {
         $result = htmlspecialchars($data['value']);
         $result = '<a class="inline" href="mailto:' . $result . '">' . $result . '</a>';
         if (isset($data['ext']) && $data['ext']) {
             $ext = $data['ext'];
             $f = waContactFields::get('email');
             $exts = $f->getParameter('ext');
             if (isset($exts[$ext])) {
                 $ext = _ws($exts[$ext]);
             }
             $result .= ' <em class="hint">' . htmlspecialchars($ext) . '</em>';
         }
         return $result;
     }
     return htmlspecialchars($data);
 }
 public function execute()
 {
     $strings = array();
     // Application locale strings
     foreach (array('Loading...', 'select country', '&lt;no name&gt;', '&lt;none&gt;', '<no name>', 'no name', 'not set', 'Access', 'Add another', 'Actions with selected', 'Add to category', 'Add to list', 'Administrator', 'All customers', 'No categories available', 'Are you sure you want to delete this form?', 'At least one of these fields must be filled', 'Cancel', 'cancel', 'delete', 'Checking links to other applications...', 'Company', 'Contacts', 'Show %s records on a page', 'Contacts will not be deleted.', 'Customize access', 'Delete', 'Delete category', 'Delete group', 'Edit category', 'Edit group', 'Edit list', 'Edit filter', 'Edit', 'edit search', 'Email', 'Export', 'Facebook', 'Flickr', 'Internet', 'Limited access', 'Merge', 'Merge contacts', 'Must be a number.', 'Incorrect Email address format.', 'Incorrect URL format.', 'Name', 'next', 'No access', 'No contacts will be deleted.', 'or', 'other', 'Page not found', 'Pages', 'Photo', 'Picasa', 'prev', 'Remove selected', 'required', 'Save', 'Send', 'Settings', 'which?', 'Sort by', 'This field is required.', 'Passwords do not match.', 'Delete this group?', 'Delete this filter?', 'Delete filter', 'Delete this list?', 'Delete list', 'Save as a filter', 'Delete this category?', 'Exclude from this category', 'Exclude from this list', 'Exclude contacts from category &ldquo;%s&rdquo;?', 'Exclude contacts from list &ldquo;%s&rdquo;?', 'Exclude', 'select region', 'day', 'month', 'year', 'New user group', 'Access rights for group &ldquo;%s&rdquo;', 'All users', 'Groups', 'New group', 'Person', 'Search', '@', 'No users in this group.', 'To add users to group, go to <a href="#/users/all/">All users</a>, select them, and click <strong>Actions with selected / Add to group</strong>.', 'map', 'There is no geographic location info for these contacts.', 'on the map', 'Shown', 'User groups are for organizing Webasyst users and setting common access rights for groups.', 'Add to group', 'Close settings panel', 'Apply', 'Exclude users from group "%s"?', 'Exclude from this group', 'Edit user group', 'Photo', 'Access', 'Person', 'Company', 'or', 'Loading...', 'New user', 'of', 'New contact', 'Email address is not specified', 'You can grant access to your account backend to any existing contact.', 'Find a contact, or <a href="#/contacts/add/">create a new contact</a>, and then customize their access rights on Access tab.', 'No contacts.', 'Details', 'List', 'Userpics') as $s) {
         $strings[$s] = _w($s);
     }
     foreach (array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') as $s) {
         $strings[$s] = _ws($s);
     }
     // multiple forms
     foreach (array(array('contacts selected', 'contact selected')) as $s) {
         $strings[$s[0]] = array(_w($s[1], $s[0], 1), _w($s[1], $s[0], 2), _w($s[1], $s[0], 5));
     }
     $this->view->assign('strings', $strings ? $strings : new stdClass());
     // stdClass is used to show {} instead of [] when there's no strings
     $this->getResponse()->addHeader('Content-Type', 'text/javascript; charset=utf-8');
 }
 public function getData($id)
 {
     $data = waRequest::post('info');
     if (!$id) {
         $product_id = waRequest::get('product_id', null, waRequest::TYPE_INT);
         $product = $this->getProduct($product_id);
         $data['product_id'] = $product['id'];
     }
     $data['url'] = trim($data['url'], '/');
     if (!$id && !$data['url']) {
         $data['url'] = shopHelper::transliterate($data['name']);
     }
     if (empty($data['name'])) {
         $data['name'] = '(' . _ws('no-title') . ')';
     }
     $data['status'] = isset($data['status']) ? 1 : 0;
     return $data;
 }
Example #29
0
 public function execute()
 {
     $page = $this->params;
     if ($page && is_array($page)) {
         $params = waRequest::param();
         foreach ($params as $k => $v) {
             if (in_array($k, array('url', 'module', 'action'))) {
                 unset($params[$k]);
             }
         }
         $this->view->getHelper()->globals($params);
         $this->view->assign('page', $page);
         $this->view->assign('wa_theme_url', $this->getThemeUrl());
         $page['content'] = $this->view->fetch('string:' . $page['content']);
         $this->view->assign('page', $page);
         // set response
         if (!$this->getResponse()->getTitle()) {
             $this->getResponse()->setTitle($page['title']);
         }
         $this->getResponse()->setMeta(array('keywords' => isset($page['keywords']) ? $page['keywords'] : '', 'description' => isset($page['description']) ? $page['description'] : ''));
         $this->view->assign('breadcrumbs', $this->getBreadcrumbs($page));
         $this->setThemeTemplate('page.html');
     } else {
         // show exception
         if ($this->params instanceof Exception) {
             $e = $this->params;
             $code = $e->getCode();
             $this->getResponse()->setStatus($code ? $code : 500);
             $this->view->assign('error_message', $e->getMessage());
         } else {
             $code = 404;
             $this->getResponse()->setStatus($code);
         }
         // 404 error
         if ($code == 404) {
             $this->getResponse()->setTitle('404. ' . _ws("Page not found"));
             $this->view->assign('error_message', _ws("Page not found"));
         }
         $this->view->assign('error_code', $code);
         $this->setThemeTemplate('error.html');
         $this->view->assign('page', array());
     }
 }
    public function getHTML($params = array(), $attrs = '')
    {
        if (isset($params['namespace']) && $params['namespace'] == 'profile') {
            $params['value'] = '';
        }
        $value = isset($params['value']) ? $params['value'] : '';
        $disabled = '';
        if (wa()->getEnv() === 'frontend' && isset($params['my_profile']) && $params['my_profile'] == '1') {
            $disabled = 'disabled="disabled"';
        }
        $errors_html = '';
        if (isset($params['validation_errors']) && !empty($params['validation_errors'])) {
            $attrs = preg_replace('~class="~', 'class="error ', $attrs);
            if (false === strpos($attrs, 'class="error')) {
                $attrs .= ' class="error"';
            }
            if (!is_array($params['validation_errors'])) {
                $params['validation_errors'] = array((string) $params['validation_errors']);
            }
            foreach ($params['validation_errors'] as $error_msg) {
                if (is_array($error_msg)) {
                    $error_msg = implode("<br>\n", $error_msg);
                }
                $errors_html .= "\n" . '<em class="errormsg">' . htmlspecialchars($error_msg) . '</em>';
            }
        }
        $password_html = '<input ' . $attrs . ' ' . $disabled . ' type="password" name="' . $this->getHTMLName($params) . '" value="' . htmlspecialchars($value) . '">';
        if (isset($params['add_password_confirm']) && $params['add_password_confirm'] == true) {
            unset($params['add_password_confirm']);
            $password_confirm_id = 'password_confirm';
            $password_confirm = new waContactPasswordField($password_confirm_id, _ws('Confirm password'));
            $params['id'] = $password_confirm_id;
            $password_confirm_html = $password_confirm->getHTML($params, $attrs);
            $password_html = <<<HTML
<p>
    <span class="field"><span>{$this->getName()}</span>{$password_html}</span>
    <span class="field"><span>{$password_confirm->getName()}</span>{$password_confirm_html}</span>
    {$errors_html}
</p>
HTML;
        }
        return $password_html;
    }