public static function step1($iWidth = 300)
 {
     if ((new Session())->exists('mail_step1')) {
         Header::redirect(Uri::get('user', 'signup', 'step2'));
     }
     if (isset($_POST['submit_join_user'])) {
         if (\PFBC\Form::isValid($_POST['submit_join_user'])) {
             (new JoinFormProcess())->step1();
         }
         Header::redirect();
     }
     $oForm = new \PFBC\Form('form_join_user', $iWidth);
     $oForm->configure(array('action' => ''));
     $oForm->addElement(new \PFBC\Element\Hidden('submit_join_user', 'form_join_user'));
     $oForm->addElement(new \PFBC\Element\Token('join'));
     // Check if the Connect module is enabled
     if (SysMod::isEnabled('connect')) {
         $oForm->addElement(new \PFBC\Element\HTMLExternal('<div class="center"><a href="' . Uri::get('connect', 'main', 'index') . '" target="_blank" class="btn btn-primary">' . t('Universal Login') . '</a></div>'));
     }
     $oForm->addElement(new \PFBC\Element\Textbox(t('Your First Name:'), 'first_name', array('id' => 'str_first_name', 'onblur' => 'CValid(this.value,this.id,2,20)', 'title' => t('Enter your first name.'), 'required' => 1, 'validation' => new \PFBC\Validation\Str(2, 20))));
     $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error str_first_name"></span>'));
     $oForm->addElement(new \PFBC\Element\Username(t('Username:'******'username', array('description' => PH7_URL_ROOT . '<strong><span class="your-user-name">' . t('your-user-name') . '</span><span class="username"></span></strong>' . PH7_PAGE_EXT, 'id' => 'username', 'title' => t('This username will be used for your site url.'), 'required' => 1, 'validation' => new \PFBC\Validation\Username())));
     $oForm->addElement(new \PFBC\Element\Email(t('Your Email:'), 'mail', array('id' => 'email', 'onblur' => 'CValid(this.value, this.id,\'guest\')', 'title' => t('Enter your valid email address.'), 'required' => 1, 'validation' => new \PFBC\Validation\CEmail('guest'))));
     $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error email"></span>'));
     $oForm->addElement(new \PFBC\Element\Password(t('Your Password:'******'password', array('id' => 'password', 'onkeyup' => 'checkPassword(this.value)', 'onblur' => 'CValid(this.value, this.id)', 'title' => t('Your password. It will be used for logging in to the site. This storage is secure, because we are using an encrypted format.'), 'required' => 1, 'validation' => new \PFBC\Validation\Password())));
     $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error password"></span>'));
     if (DbConfig::getSetting('isCaptchaUserSignup')) {
         $oForm->addElement(new \PFBC\Element\CCaptcha(t('Captcha:'), 'captcha', array('id' => 'ccaptcha', 'onkeyup' => 'CValid(this.value, this.id)', 'description' => t('Enter the code above:'))));
         $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error ccaptcha"></span>'));
     }
     $oForm->addElement(new \PFBC\Element\Checkbox(t('Terms of Service'), 'terms', array(1 => '<em>' . t('I have read and agree to the %0%.', '<a href="' . Uri::get('page', 'main', 'terms') . '" rel="nofollow" target="_blank">' . t('Terms of Service') . '</a>') . '</em>'), array('id' => 'terms', 'onblur' => 'CValid(this.checked, this.id)', 'required' => 1)));
     $oForm->addElement(new \PFBC\Element\HTMLExternal('<span class="input_error terms-0"></span>'));
     $oForm->addElement(new \PFBC\Element\Button(t('Join for free!'), 'submit', array('icon' => 'heart')));
     // JavaScript Files
     $oForm->addElement(new \PFBC\Element\HTMLExternal('<script src="' . PH7_URL_STATIC . PH7_JS . 'signup.js"></script><script src="' . PH7_URL_STATIC . PH7_JS . 'validate.js"></script>'));
     $oForm->render();
 }
 /**
  * Check if the module is not disabled, otherwise we displayed a Not Found page.
  *
  * @return void If the module is disabled, displays the Not Found page and exit the script.
  */
 private final function _checkModStatus()
 {
     if (!SysMod::isEnabled($this->registry->module)) {
         $this->displayPageNotFound();
     }
 }