Change the contactowner module to put the send email form in a floating dialog instead of a different gallery page.
This commit is contained in:
parent
d8de48f271
commit
6c605659f3
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 = "<a href=\"" . url::site("contactowner/emailid/" .
|
||||
$theme->item->owner_id) . "/" . $theme->item->id . "\">" . t("Contact") . " " .
|
||||
$theme->item->owner_id) . "/" . $theme->item->id . "\" class='g-dialog-link'>" . t("Contact") . " " .
|
||||
$userDetails[0]->name . "</a>";
|
||||
$displayBlock = true;
|
||||
}
|
||||
@ -63,10 +63,10 @@ class contactowner_block_Core {
|
||||
if (module::get_var("contactowner", "contact_owner_link")) {
|
||||
if ($theme->item()) {
|
||||
$block->content->ownerLink = "<a href=\"" . url::site("contactowner/emailowner") . "/" . $theme->item->id .
|
||||
"\">" . t(module::get_var("contactowner", "contact_button_text")) . "</a>";
|
||||
"\" class='g-dialog-link'>" . t(module::get_var("contactowner", "contact_button_text")) . "</a>";
|
||||
} else {
|
||||
$block->content->ownerLink = "<a href=\"" . url::site("contactowner/emailowner") .
|
||||
"\">" . t(module::get_var("contactowner", "contact_button_text")) . "</a>";
|
||||
"\" class='g-dialog-link'>" . t(module::get_var("contactowner", "contact_button_text")) . "</a>";
|
||||
}
|
||||
$displayBlock = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user