Refactored Csrf form widget. + Added unit tests for Csrt.

This commit is contained in:
Dmitry Khomutov 2018-03-12 22:58:12 +07:00
commit 7abd3febc1
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
9 changed files with 175 additions and 103 deletions

View file

@ -92,9 +92,12 @@ class GroupController extends Controller
}
$form = new Form();
$form->setMethod('POST');
$form->setAction(APP_URL . 'group/edit' . (!is_null($groupId) ? '/' . $groupId : ''));
$form->addField(new Form\Element\Csrf('group_form'));
$title = new Form\Element\Text('title');
$title->setContainerClass('form-group');
$title->setClass('form-control');