protected function viewConfiguration()
 {
     /* -----------------------------------------------
      * Populating fields array
      * -----------------------------------------------
      */
     $fields = isset($_POST['fields']) ? $_POST['fields'] : $this->_params['default-config'];
     /* -----------------------------------------------
      * Welcome
      * -----------------------------------------------
      */
     $div = new XMLElement('div');
     $div->appendChild(new XMLElement('h2', __('Find something sturdy to hold on to because things are about to get awesome.')));
     $div->appendChild(new XMLElement('p', __('Think of this as a pre-game warm up. You know you’re going to kick-ass, so you’re savouring every moment before the show. Welcome to the Symphony install page.')));
     $this->Form->appendChild($div);
     if (!empty($this->_params['errors'])) {
         $this->Form->appendChild(Widget::Error(new XMLElement('p'), __('Oops, a minor hurdle on your path to glory! There appears to be something wrong with the details entered below.')));
     }
     /* -----------------------------------------------
      * Environment settings
      * -----------------------------------------------
      */
     $fieldset = new XMLElement('fieldset');
     $div = new XMLElement('div');
     $this->__appendError(array('no-write-permission-root', 'no-write-permission-workspace'), $div);
     if ($div->getNumberOfChildren() > 0) {
         $fieldset->appendChild($div);
         $this->Form->appendChild($fieldset);
     }
     /* -----------------------------------------------
      * Website & Locale settings
      * -----------------------------------------------
      */
     $Environment = new XMLElement('fieldset');
     $Environment->appendChild(new XMLElement('legend', __('Website Preferences')));
     $label = Widget::Label(__('Name'), Widget::Input('fields[general][sitename]', $fields['general']['sitename']));
     $this->__appendError(array('general-no-sitename'), $label);
     $Environment->appendChild($label);
     $label = Widget::Label(__('Admin Path'), Widget::Input('fields[symphony][admin-path]', $fields['symphony']['admin-path']));
     $this->__appendError(array('no-symphony-path'), $label);
     $Environment->appendChild($label);
     $Fieldset = new XMLElement('fieldset', null, array('class' => 'frame'));
     $Fieldset->appendChild(new XMLElement('legend', __('Date and Time')));
     $Fieldset->appendChild(new XMLElement('p', __('Customise how Date and Time values are displayed throughout the Administration interface.')));
     // Timezones
     $options = DateTimeObj::getTimezonesSelectOptions(isset($fields['region']['timezone']) && !empty($fields['region']['timezone']) ? $fields['region']['timezone'] : date_default_timezone_get());
     $Fieldset->appendChild(Widget::Label(__('Region'), Widget::Select('fields[region][timezone]', $options)));
     // Date formats
     $options = DateTimeObj::getDateFormatsSelectOptions($fields['region']['date_format']);
     $Fieldset->appendChild(Widget::Label(__('Date Format'), Widget::Select('fields[region][date_format]', $options)));
     // Time formats
     $options = DateTimeObj::getTimeFormatsSelectOptions($fields['region']['time_format']);
     $Fieldset->appendChild(Widget::Label(__('Time Format'), Widget::Select('fields[region][time_format]', $options)));
     $Environment->appendChild($Fieldset);
     $this->Form->appendChild($Environment);
     /* -----------------------------------------------
      * Database settings
      * -----------------------------------------------
      */
     $Database = new XMLElement('fieldset');
     $Database->appendChild(new XMLElement('legend', __('Database Connection')));
     $Database->appendChild(new XMLElement('p', __('Please provide Symphony with access to a database.')));
     // Database name
     $label = Widget::Label(__('Database'), Widget::Input('fields[database][db]', $fields['database']['db']));
     $this->__appendError(array('database-incorrect-version', 'unknown-database'), $label);
     $Database->appendChild($label);
     // Database credentials
     $Div = new XMLElement('div', null, array('class' => 'two columns'));
     $Div->appendChild(Widget::Label(__('Username'), Widget::Input('fields[database][user]', $fields['database']['user']), 'column'));
     $Div->appendChild(Widget::Label(__('Password'), Widget::Input('fields[database][password]', $fields['database']['password'], 'password'), 'column'));
     $this->__appendError(array('database-invalid-credentials'), $Div);
     $Database->appendChild($Div);
     // Advanced configuration
     $Fieldset = new XMLElement('fieldset', null, array('class' => 'frame'));
     $Fieldset->appendChild(new XMLElement('legend', __('Advanced Configuration')));
     $Fieldset->appendChild(new XMLElement('p', __('Leave these fields unless you are sure they need to be changed.')));
     // Advanced configuration: Host, Port
     $Div = new XMLElement('div', null, array('class' => 'two columns'));
     $Div->appendChild(Widget::Label(__('Host'), Widget::Input('fields[database][host]', $fields['database']['host']), 'column'));
     $Div->appendChild(Widget::Label(__('Port'), Widget::Input('fields[database][port]', $fields['database']['port']), 'column'));
     $this->__appendError(array('no-database-connection'), $Div);
     $Fieldset->appendChild($Div);
     // Advanced configuration: Table Prefix
     $label = Widget::Label(__('Table Prefix'), Widget::Input('fields[database][tbl_prefix]', $fields['database']['tbl_prefix']));
     $this->__appendError(array('database-table-prefix'), $label);
     $Fieldset->appendChild($label);
     $Database->appendChild($Fieldset);
     $this->Form->appendChild($Database);
     /* -----------------------------------------------
      * Permission settings
      * -----------------------------------------------
      */
     $Permissions = new XMLElement('fieldset');
     $Permissions->appendChild(new XMLElement('legend', __('Permission Settings')));
     $Permissions->appendChild(new XMLElement('p', __('Set the permissions Symphony uses when saving files/directories.')));
     $Div = new XMLElement('div', null, array('class' => 'two columns'));
     $Div->appendChild(Widget::Label(__('Files'), Widget::Input('fields[file][write_mode]', $fields['file']['write_mode']), 'column'));
     $Div->appendChild(Widget::Label(__('Directories'), Widget::Input('fields[directory][write_mode]', $fields['directory']['write_mode']), 'column'));
     $Permissions->appendChild($Div);
     $this->Form->appendChild($Permissions);
     /* -----------------------------------------------
      * User settings
      * -----------------------------------------------
      */
     $User = new XMLElement('fieldset');
     $User->appendChild(new XMLElement('legend', __('User Information')));
     $User->appendChild(new XMLElement('p', __('Once installation is complete, you will be able to log in to the Symphony admin area with these user details.')));
     // Username
     $label = Widget::Label(__('Username'), Widget::Input('fields[user][username]', $fields['user']['username']));
     $this->__appendError(array('user-no-username'), $label);
     $User->appendChild($label);
     // Password
     $Div = new XMLElement('div', null, array('class' => 'two columns'));
     $Div->appendChild(Widget::Label(__('Password'), Widget::Input('fields[user][password]', $fields['user']['password'], 'password'), 'column'));
     $Div->appendChild(Widget::Label(__('Confirm Password'), Widget::Input('fields[user][confirm-password]', $fields['user']['confirm-password'], 'password'), 'column'));
     $this->__appendError(array('user-no-password', 'user-password-mismatch'), $Div);
     $User->appendChild($Div);
     // Personal information
     $Fieldset = new XMLElement('fieldset', null, array('class' => 'frame'));
     $Fieldset->appendChild(new XMLElement('legend', __('Personal Information')));
     $Fieldset->appendChild(new XMLElement('p', __('Please add the following personal details for this user.')));
     // Personal information: First Name, Last Name
     $Div = new XMLElement('div', null, array('class' => 'two columns'));
     $Div->appendChild(Widget::Label(__('First Name'), Widget::Input('fields[user][firstname]', $fields['user']['firstname']), 'column'));
     $Div->appendChild(Widget::Label(__('Last Name'), Widget::Input('fields[user][lastname]', $fields['user']['lastname']), 'column'));
     $this->__appendError(array('user-no-name'), $Div);
     $Fieldset->appendChild($Div);
     // Personal information: Email Address
     $label = Widget::Label(__('Email Address'), Widget::Input('fields[user][email]', $fields['user']['email']));
     $this->__appendError(array('user-invalid-email'), $label);
     $Fieldset->appendChild($label);
     $User->appendChild($Fieldset);
     $this->Form->appendChild($User);
     /* -----------------------------------------------
      * Submit area
      * -----------------------------------------------
      */
     $this->Form->appendChild(new XMLElement('h2', __('Install Symphony')));
     $this->Form->appendChild(new XMLElement('p', __('The installation process goes by really quickly. Make sure to take a deep breath before you press that sweet button.', array('<code>' . basename(INSTALL_URL) . '</code>'))));
     $Submit = new XMLElement('div', null, array('class' => 'submit'));
     $Submit->appendChild(Widget::Input('lang', Lang::get(), 'hidden'));
     $Submit->appendChild(Widget::Input('action[install]', __('Install Symphony'), 'submit'));
     $this->Form->appendChild($Submit);
 }