/** * used for the ajax request to reorder the fields * @return string */ public function action_saveorder() { $field = new Model_UserField(); $this->auto_render = FALSE; $this->template = View::factory('js'); $order = Core::get('order'); array_walk($order, function (&$item, $key) { $item = str_replace('li_', '', $item); }); if ($field->change_order($order)) { $this->template->content = __('Saved'); } else { $this->template->content = __('Error'); } }