<h3 class="page-header">Change Password</h3>

<?php
$messenger = $this->flashMessenger()->setNamespace('profile'); 
if ($messenger->hasSuccessMessages()) {
    $messages = $messenger->getSuccessMessages();
    echo $this->alert($messages[0], 'alert-success', true);
}
if ($messenger->hasErrorMessages()) {
    $messages = $messenger->getErrorMessages();
    echo $this->alert($messages[0], 'alert-danger', true);
}
?>

<?php
    $form = $this->form;
    $form->setAttribute('action', $this->url('profile/manage', array('action' => 'change-password')));
    $form->setAttribute('id', 'form-user-change-password');
    $form->prepare();
    $this->form($form);

    echo $this->form()->openTag($form);

    echo $this->formRow($form->get('passwordOld'));
    echo $this->formRow($form->get('passwordNew1'));
    echo $this->formRow($form->get('passwordNew2'));

    ?>
<div class="form-group">
    <div class="col-sm-offset-3 col-sm-9">
        <?php echo $this->formButton($form->get('save')) . ' '; ?>
    </div>
</div>
<?php
    echo $this->form()->closeTag();
