summaryrefslogtreecommitdiff
path: root/modules/forge/libraries/Form_Submit.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forge/libraries/Form_Submit.php')
-rw-r--r--modules/forge/libraries/Form_Submit.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/forge/libraries/Form_Submit.php b/modules/forge/libraries/Form_Submit.php
new file mode 100644
index 00000000..527580c9
--- /dev/null
+++ b/modules/forge/libraries/Form_Submit.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * FORGE submit input library.
+ *
+ * $Id$
+ *
+ * @package Forge
+ * @author Kohana Team
+ * @copyright (c) 2007-2008 Kohana Team
+ * @license http://kohanaphp.com/license.html
+ */
+class Form_Submit_Core extends Form_Input {
+
+ protected $data = array
+ (
+ 'type' => 'submit',
+ 'class' => 'submit'
+ );
+
+ protected $protect = array('type');
+
+ public function __construct($value)
+ {
+ $this->data['value'] = $value;
+ }
+
+ public function render()
+ {
+ $data = $this->data;
+ unset($data['label']);
+
+ return form::button($data);
+ }
+
+ public function validate()
+ {
+ // Submit buttons do not need to be validated
+ return $this->is_valid = TRUE;
+ }
+
+} // End Form Submit \ No newline at end of file