Skip to content

Commit

Permalink
put sucesss message in a 'good message' paragraph
Browse files Browse the repository at this point in the history
  • Loading branch information
jedateach committed Oct 19, 2011
1 parent 220adec commit a38b985
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/EnquiryForm.php
Expand Up @@ -29,11 +29,15 @@ function submitenquiry($data,$form){
if(isset($data['Email']) && Email::is_valid_address($data['Email']))
$email->replyTo($data['Email']);
$success = $email->send();
$content = ($siteconfig && $siteconfig->EnquiryContent) ? $siteconfig->EnquiryContent : '<p>Thanks for your contact. We\'ll be in touch shortly.</p>' ;

$defaultmessage = "<p class=\"message good\">"._t("Enquiry.SUCCESS","Thanks for your contact. We'll be in touch shortly.")."</p>";
$content = ($siteconfig && $siteconfig->EnquiryContent) ? $siteconfig->EnquiryContent : $defaultmessage ;

if(Director::is_ajax()){
return "success";
}

//TODO: submit to a new "Page" pagetype
return array(
'Title' => 'Contact a Technician',
'Content' => $content
Expand Down

0 comments on commit a38b985

Please sign in to comment.