register.phtml 1.23 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<h1><?php echo $this->translate("Register"); ?></h1>

<?php
if (!$this->enableRegistration) {
    print $this->translate("Registration is disabled");
    return;
}
$form = $this->registerForm;
$form->prepare();
$form->setAttribute('action', $this->url('zfcuser/register'));
$form->setAttribute('method', 'post');
?>

<?php echo $this->form()->openTag($form) ?>
    <dl class="zend_form">
    <?php foreach ($form as $element): ?>
Bertrand Gauthier's avatar
Bertrand Gauthier committed
17
        <?php if (!$element instanceof Laminas\Form\Element\Button): ?>
18
19
            <dt><?php echo $this->formLabel($element) ?></dt>
        <?php endif ?>
Bertrand Gauthier's avatar
Bertrand Gauthier committed
20
        <?php if ($element instanceof Laminas\Form\Element\Button): ?>
21
            <dd><?php echo $this->formButton($element) ?></dd>
Bertrand Gauthier's avatar
Bertrand Gauthier committed
22
        <?php elseif ($element instanceof Laminas\Form\Element\Captcha): ?>
23
24
25
26
27
28
29
30
31
32
            <dd><?php echo $this->formCaptcha($element) . $this->formElementErrors($element) ?></dd>
        <?php else: ?>
            <dd><?php echo $this->formInput($element) . $this->formElementErrors($element) ?></dd>
        <?php endif ?>
    <?php endforeach ?>
    </dl>
    <?php if ($this->redirect): ?>
        <input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
    <?php endif ?>
<?php echo $this->form()->closeTag() ?>