| Conditions | 1 |
| Paths | 1 |
| Total Lines | 50 |
| Code Lines | 32 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function __construct($name = null) |
||
| 23 | { |
||
| 24 | // we want to ignore the name passed |
||
| 25 | parent::__construct('userdata'); |
||
| 26 | $this->setAttribute('method', 'post'); |
||
| 27 | $this->add( |
||
| 28 | array( |
||
| 29 | 'name' => 'user_id', |
||
| 30 | 'attributes' => array( |
||
| 31 | 'type' => 'hidden', |
||
| 32 | ), |
||
| 33 | ) |
||
| 34 | ); |
||
| 35 | |||
| 36 | $this->add( |
||
| 37 | array( |
||
| 38 | 'name' => 'display_name', |
||
| 39 | 'attributes' => array( |
||
| 40 | 'type' => 'text', |
||
| 41 | ), |
||
| 42 | 'options' => array( |
||
| 43 | 'label' => 'Display Name', |
||
| 44 | ), |
||
| 45 | ) |
||
| 46 | ); |
||
| 47 | |||
| 48 | $this->add( |
||
| 49 | array( |
||
| 50 | 'name' => 'submit', |
||
| 51 | 'attributes' => array( |
||
| 52 | 'type' => 'submit', |
||
| 53 | 'value' => 'save', |
||
| 54 | 'id' => 'submitbutton', |
||
| 55 | ), |
||
| 56 | 'options' => array( |
||
| 57 | 'label' => 'save', |
||
| 58 | ), |
||
| 59 | ) |
||
| 60 | ); |
||
| 61 | |||
| 62 | $this->add( |
||
| 63 | array( |
||
| 64 | 'name' => 'reset', |
||
| 65 | 'attributes' => array( |
||
| 66 | 'type' => 'reset', |
||
| 67 | 'value' => 'reset', |
||
| 68 | 'id' => 'resetbutton', |
||
| 69 | ), |
||
| 70 | 'options' => array( |
||
| 71 | 'label' => 'reset', |
||
| 72 | ), |
||
| 76 | } |