diff --git a/3.0/modules/contactowner/controllers/contactowner.php b/3.0/modules/contactowner/controllers/contactowner.php index 0ba096df..8d140872 100644 --- a/3.0/modules/contactowner/controllers/contactowner.php +++ b/3.0/modules/contactowner/controllers/contactowner.php @@ -83,10 +83,10 @@ class ContactOwner_Controller extends Controller { } // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $this->get_email_form("-1", $item_id); - print $template; + $view = new View("contactowner_emailform.html"); + $view->sendmail_form = $this->get_email_form("-1", $item_id); + + print $view; } public function emailid($user_id, $item_id) { @@ -98,10 +98,11 @@ class ContactOwner_Controller extends Controller { } // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $this->get_email_form($user_id, $item_id); - print $template; + // Set up and display the actual page. + $view = new View("contactowner_emailform.html"); + $view->sendmail_form = $this->get_email_form($user_id, $item_id); + + print $view; } public function sendemail($user_id) { @@ -154,18 +155,12 @@ class ContactOwner_Controller extends Controller { ->message($str_emailbody) ->send(); - // Display a message telling the visitor that their email has been sent. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = t("Your Message Has Been Sent."); - print $template; + message::info(t("Your Message Has Been Sent.")); + json::reply(array("result" => "success")); } else { // Set up and display the actual page. - $template = new Theme_View("page.html", "other", "Contact"); - $template->content = new View("contactowner_emailform.html"); - $template->content->sendmail_form = $form; - print $template; + json::reply(array("result" => "error", "html" => (string) $form)); } } } diff --git a/3.0/modules/contactowner/helpers/contactowner_block.php b/3.0/modules/contactowner/helpers/contactowner_block.php index b2c31500..c2629a56 100644 --- a/3.0/modules/contactowner/helpers/contactowner_block.php +++ b/3.0/modules/contactowner/helpers/contactowner_block.php @@ -53,7 +53,7 @@ class contactowner_block_Core { if ((count($userDetails) > 0) && ($userDetails[0]->email != "") && (module::get_var("contactowner", "contact_user_link") == true)) { $block->content->userLink = "item->owner_id) . "/" . $theme->item->id . "\">" . t("Contact") . " " . + $theme->item->owner_id) . "/" . $theme->item->id . "\" class='g-dialog-link'>" . t("Contact") . " " . $userDetails[0]->name . ""; $displayBlock = true; } @@ -63,10 +63,10 @@ class contactowner_block_Core { if (module::get_var("contactowner", "contact_owner_link")) { if ($theme->item()) { $block->content->ownerLink = "item->id . - "\">" . t(module::get_var("contactowner", "contact_button_text")) . ""; + "\" class='g-dialog-link'>" . t(module::get_var("contactowner", "contact_button_text")) . ""; } else { $block->content->ownerLink = "" . t(module::get_var("contactowner", "contact_button_text")) . ""; + "\" class='g-dialog-link'>" . t(module::get_var("contactowner", "contact_button_text")) . ""; } $displayBlock = true; }