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