Skip to content

Instantly share code, notes, and snippets.

@cezar08
Created August 30, 2014 18:24
Show Gist options
  • Select an option

  • Save cezar08/78cd6694b718f687fd42 to your computer and use it in GitHub Desktop.

Select an option

Save cezar08/78cd6694b718f687fd42 to your computer and use it in GitHub Desktop.
<?php
namespace Admin\Form;
use Zend\Form\Form;
class Login extends Form {
public function __construct() {
parent::__construct('login');
$this->setAttribute('method', 'post');
$this->setAttribute('action', '/admin/auth/login');
$this->add(array(
'type' => 'text',
'name' => 'login',
'options' => array(
'label' => 'Usuário:'
),
'attributes' => array(
'placeholder' => 'Entre com o seu usuário'
),
)
);
$this->add(array(
'type' => 'password',
'name' => 'password',
'options' => array(
'label' => 'Senha:'
),
'attributes' => array(
'placeholder' => 'Entre com sua senha'
),
)
);
$this->add(array(
'type' => 'submit',
'name' => 'submit',
'attributes' => array(
'value' => 'Entrar'
),
)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment