$captcha = array('recaptcha_challenge_field' => $request->getParameter('recaptcha_challenge_field'),
'recaptcha_response_field' => $request->getParameter('recaptcha_response_field'),
);
- $this->form->bind(array_merge($request->getParameter($this->form->getName()), array('captcha' => $captcha)));
+
+ $this->form->bind(array_merge($request->getParameter($this->form->getName()), array('captcha' => $captcha)), $request->getFiles($this->form->getName()));
if ($this->form->isValid())
{
$user = $this->form->save();
<?php use_helper('I18N') ?>
-<form action="<?php echo url_for('@register_index') ?>" method="post">
+<form action="<?php echo url_for('@register_index') ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
+ <fieldset>
+ <legend><?php echo __('REGISTER', null, 'sf_guard') ?></legend>
<table>
- <?php echo $form ?>
- <tfoot>
- <tr>
- <td colspan="2">
- <input type="submit" name="register" value="<?php echo __('Register', null, 'sf_guard') ?>" />
+ <tbody>
+ <?php echo $form->renderGlobalErrors() ?>
+ <?php echo $form->renderHiddenFields(false) ?>
+ <?php echo $form['first_name']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['last_name']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['email_address']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['username']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['password']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['password_again']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['language_id']->renderRow(array('class' => 'validate-selection')) ?>
+ <?php echo $form['new']['company_cif']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['new']['company_logo']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['new']['new']['language_id']->renderRow(array('class' => 'validate-selection')) ?>
+ <?php echo $form['new']['new']['company_name']->renderRow(array('class' => 'required')) ?>
+ <?php echo $form['captcha']->RenderRow() ?>
+ </tbody>
+ </table>
+ </fieldset>
+ <table align="right">
+ <tbody>
+ <tr>
+ <td>
+ <input type="submit" name="register" value="<?php echo __('Register', null, 'sf_guard') ?>" class="NFButton"/>
</td>
- </tr>
- </tfoot>
+ <tr>
+ </tbody>
</table>
</form>
<?php use_helper('I18N') ?>
-<h1><?php echo __('Log In', null, 'sf_guard') ?></h1>
+<h1><?php echo __('Log In or Register', null, 'sf_guard') ?></h1>
<?php include_partial('signin_form', array('form' => $form)) ?>