Created
January 28, 2009 02:09
-
-
Save gregfroese/53772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function editAboutMe_ajax($params) { | |
| $form = SilkForm::create_form_start(array("remote" => "true", "url" => "/silk/mp/portfolio/saveAboutMe_ajax")); | |
| $form .= SilkForm::create_input_textarea(array("value" => $params["description"], "cols" => "60", "name" => "description")); | |
| $form .= SilkForm::create_input_hidden(array("name" => "id", "value" => $params["id"])); | |
| $form .= "<br />"; | |
| $form .= silkform::create_input_submit(array("value" => "Save")); | |
| $form .= SilkForm::create_form_end(); | |
| $this->show_layout = false; | |
| $resp = new SilkAjax(); | |
| $resp->replace_html("#AboutMe", $form); | |
| return $resp->get_result(); | |
| } | |
| public function saveAboutMe_ajax($params) { | |
| $this->show_layout = false; | |
| $resp = new SilkAjax(); | |
| // $portfolio = orm("portfolio")->find_by_id($params["id"]); | |
| // $portfolio->description = $params["description"]; | |
| // $portfolio->save(); | |
| // $resp->replace_html("#AboutMe", $params["description"]); | |
| $resp->replace_html("#AboutMe", "It worked"); | |
| return $resp->get_result(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment