diff options
Diffstat (limited to 'modules/forge')
-rw-r--r-- | modules/forge/libraries/Forge.php | 5 | ||||
-rw-r--r-- | modules/forge/libraries/Form_Input.php | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/modules/forge/libraries/Forge.php b/modules/forge/libraries/Forge.php index d9da4c7d..5807c849 100644 --- a/modules/forge/libraries/Forge.php +++ b/modules/forge/libraries/Forge.php @@ -277,7 +277,8 @@ class Forge_Core { { foreach ($this->hidden as $input) { - $hidden[$input->name] = $input->value; + $hidden['name'] = $input->name; + $hidden['value'] = $input->value; } } @@ -299,7 +300,7 @@ class Forge_Core { // Set the form open and close $form->open = form::$form_type(arr::remove('action', $this->attr), $this->attr, $hidden); - $form->close = form::close(); + $form->close = "</form>"; // Set the inputs $form->inputs = $this->inputs; diff --git a/modules/forge/libraries/Form_Input.php b/modules/forge/libraries/Form_Input.php index 30311941..0c578011 100644 --- a/modules/forge/libraries/Form_Input.php +++ b/modules/forge/libraries/Form_Input.php @@ -317,7 +317,7 @@ class Form_Input_Core { $args = is_array($args) ? $args : array(); // Add the label or name to the beginning of the args - array_unshift($args, $this->label ? utf8::strtolower($this->label) : $this->name); + array_unshift($args, $this->label ? mb_strtolower($this->label) : $this->name); if (isset($this->error_messages[$func])) { @@ -333,7 +333,7 @@ class Form_Input_Core { case 'valid_email': case 'valid_ip': // Fetch an i18n error message - $error = Kohana::lang('validation.'.$func, $args); + $error = 'validation.'.$func; break; case substr($func, 0, 6) === 'valid_': // Strip 'valid_' from func name @@ -343,11 +343,11 @@ class Form_Input_Core { case 'digit': case 'numeric': // i18n strings have to be inserted into valid_type - $args[] = Kohana::lang('validation.'.$func); - $error = Kohana::lang('validation.valid_type', $args); + $args[] = 'validation.'.$func; + $error = 'validation.valid_type'; break; default: - $error = Kohana::lang('validation.'.$func, $args); + $error = 'validation.'.$func; } } } @@ -490,7 +490,7 @@ class Form_Input_Core { if ($this->value != $input->value) { // Field does not match - $this->errors['matches'] = array($input->label ? utf8::strtolower($input->label) : $input->name); + $this->errors['matches'] = array($input->label ? mb_strtolower($input->label) : $input->name); break; } } @@ -529,7 +529,7 @@ class Form_Input_Core { protected function rule_length($min, $max = NULL) { // Get the length, return if zero - if (($length = utf8::strlen($this->value)) === 0) + if (($length = mb_strlen($this->value)) === 0) return; if ($max == NULL) |