| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 19 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public function __construct() |
|
| 20 | { |
||
| 21 | 1 | $this->setAction(Router::getInstance()->getRoute('admin-setup')); |
|
| 22 | 1 | $this->add('username', array( |
|
| 23 | 1 | 'label' => _('User Alias'), |
|
| 24 | 1 | 'autocomplete' => 'off', |
|
| 25 | 1 | ))->add('password', array( |
|
| 26 | 1 | 'type' => 'password', |
|
| 27 | 1 | 'label' => _('Password'), |
|
| 28 | 1 | 'autocomplete' => 'off', |
|
| 29 | 1 | ))->add('profile', array( |
|
| 30 | 1 | 'type' => 'select', |
|
| 31 | 1 | 'label' => _("Role"), |
|
| 32 | 1 | 'value' => sha1('superadmin'), |
|
| 33 | 1 | 'autocomplete' => 'off', |
|
| 34 | 1 | 'data' => Security::getProfiles(), |
|
| 35 | )); |
||
| 36 | //Apply styling to the form |
||
| 37 | 1 | $this->setAttrs(array( |
|
| 38 | 1 | "class" => "col-md-6", |
|
| 39 | "autocomplete" => "off", |
||
| 40 | )); |
||
| 41 | //Add action buttons to form |
||
| 42 | 1 | $this->addButton('submit'); |
|
| 43 | 1 | } |
|
| 44 | |||
| 64 |