@@ 810-824 (lines=15) @@ | ||
807 | * @param string $value Text to show in button and ID |
|
808 | * @param array $attributes Optional atributes not listened (in array). |
|
809 | */ |
|
810 | public function addSubmit($name = '', $value = '', $attributes = array()) { |
|
811 | $data = array( |
|
812 | 'type' => 'submit', |
|
813 | 'name' => $name, |
|
814 | 'value' => $value |
|
815 | ); |
|
816 | if (!empty($attributes)) array_merge($data, $attributes); |
|
817 | ||
818 | $this->content[] = array( |
|
819 | 'type' => 'input', |
|
820 | 'data' => $data |
|
821 | ); |
|
822 | ||
823 | ||
824 | } |
|
825 | ||
826 | /** |
|
827 | * @name addButton |
|
@@ 833-845 (lines=13) @@ | ||
830 | * @param string $onClick Action to load when button is clicked |
|
831 | * @param array $attributes Optional atributes not listened (in array). |
|
832 | */ |
|
833 | public function addButton($value = '', $onClick = '', $attributes = array()) { |
|
834 | $data = array( |
|
835 | 'type' => 'button', |
|
836 | 'value' => $value, |
|
837 | 'onClick' => $onClick |
|
838 | ); |
|
839 | if (!empty($attributes)) array_merge($data, $attributes); |
|
840 | ||
841 | $this->content[] = array( |
|
842 | 'type' => 'input', |
|
843 | 'data' => $data |
|
844 | ); |
|
845 | } |
|
846 | ||
847 | ||
848 | /** |