diff --git a/Pickles.php b/Pickles.php
index 10734bb..09036b0 100755
--- a/Pickles.php
+++ b/Pickles.php
@@ -11,40 +11,4 @@ function __autoload($class) {
}
}
-class Pickles extends Object {
-
- /*
- protected $config = null;
-
- private $controller = null;
-
- public function __construct($site, $controller = 'Web') {
- parent::__construct();
-
- new Controller($controller);
- }
- */
-
-}
-
-/*
-if (Config::getSession() && !isset($_SESSION)) {
- session_start();
-}
-
-
-// Use the FCKeditor instead of textareas
-// @todo add a wrapper for these two
-if (Config::getFCKEditor()) {
- require_once JLIB_PATH . 'common/static/fckeditor/fckeditor.php';
-}
-
-// Load up MagpieRSS is so desired
-if (Config::getMagpieRSS()) {
- require_once JLIB_PATH . '/var/www/josh/common/contrib/magpierss/rss_fetch.inc';
-}
-
-//Request::load();
-*/
-
?>
diff --git a/classes/Controller.php b/classes/Controller.php
index bcff937..ba040de 100755
--- a/classes/Controller.php
+++ b/classes/Controller.php
@@ -29,7 +29,7 @@ class Controller extends Object {
if ($this->config->get('disabled')) {
exit("
{$_SERVER['SERVER_NAME']} is currently down for maintenance
");
}
-
+
// Grab the passed in model or use the default
$name = isset($_REQUEST['model']) ? str_replace('-', '_', $_REQUEST['model']) : $this->config->get('navigation', 'default');
diff --git a/classes/Mail.php b/classes/Mail.php
index 2b223ed..444aaa2 100755
--- a/classes/Mail.php
+++ b/classes/Mail.php
@@ -24,11 +24,23 @@ class Mail {
$prefix = isset($defaults['prefix']) ? $defaults['prefix'] : null;
}
- $subject = str_replace("\n", '', (isset($prefix) ? "[{$prefix}] " : '') . $_REQUEST['subject']);
+ if (isset($defaults['subject'])) {
+ $subject = $defaults['subject'];
+ }
+ else {
+ $subject = str_replace("\n", '', (isset($prefix) ? "[{$prefix}] " : '') . $_REQUEST['subject']);
+ }
- if (mail($to, $subject, stripslashes($_REQUEST['message']), "From: {$_REQUEST['email']}\r\n")) {
+ if (isset($_REQUEST['name'])) {
+ $from = "{$_REQUEST['name']} <{$_REQUEST['email']}>";
+ }
+ else {
+ $from = $_REQUEST['email'];
+ }
+
+ if (mail($to, $subject, stripslashes($_REQUEST['message']), "From: {$from}\r\n")) {
$type = 'success';
- $message = 'Message sent successfully';
+ $message = isset($defaults['response']) ? $defaults['response'] : 'Message sent successfully';
}
else {
$type = 'error';
@@ -36,7 +48,7 @@ class Mail {
}
$return = array(
- 'type' => $type,
+ 'type' => $type,
'message' => $message
);
diff --git a/classes/Viewer/Smarty.php b/classes/Viewer/Smarty.php
index dca0309..f52a897 100644
--- a/classes/Viewer/Smarty.php
+++ b/classes/Viewer/Smarty.php
@@ -65,7 +65,10 @@ class Viewer_Smarty extends Viewer_Common {
// Pass all of our controller values to Smarty
$smarty->assign('navigation', $navigation);
$smarty->assign('section', $this->model->get('section'));
- $smarty->assign('action', $this->model->get('action')); // @todo rename me to event
+ $smarty->assign('model', $this->model->get('name'));
+ $smarty->assign('action', $this->model->get('action')); // @todo rename me to event...
+ $smarty->assign('event', $this->model->get('action')); // but it almost seems like we don't need these anymore at all
+ // Thanks to new naming conventions
$smarty->assign('admin', $this->config->get('admin', 'sections'));
$smarty->assign('template', '../templates/' . $this->model->get('name') . '.tpl'); //$template);
diff --git a/config/ribbonnutrition.com.xml b/config/ribbonnutrition.com.xml
index 16598b8..462633b 100755
--- a/config/ribbonnutrition.com.xml
+++ b/config/ribbonnutrition.com.xml
@@ -18,7 +18,8 @@
- RN
+ Ribbon Nutrition Contact Request
+ Thank you. A member of our staff will respond to your message as soon as possible.
joshsherman@gmail.com
diff --git a/static/css/foundation.css b/static/css/foundation.css
index 49f2198..9c7930e 100755
--- a/static/css/foundation.css
+++ b/static/css/foundation.css
@@ -1,10 +1,13 @@
-.center { text-align: center; }
-.left { text-align: left; }
-.right { text-align: right; }
-.top { vertical-align: top; }
-.middle { vertical-align: middle; }
-.bottom { vertical-align: bottom; }
-.nowrap { white-space: nowrap; }
-.bold { font-weight: bold; }
-.italic { font-style: italic; }
-.clear { clear: both; }
+.center { text-align: center }
+.left { text-align: left }
+.right { text-align: right }
+.top { vertical-align: top }
+.middle { vertical-align: middle }
+.bottom { vertical-align: bottom }
+.nowrap { white-space: nowrap }
+.bold { font-weight: bold }
+.italic { font-style: italic }
+.clear { clear: both }
+.underline { text-decoration: underline }
+.float-left { float: left }
+.float-right { float: right }
diff --git a/static/js/ajax.js b/static/js/ajax.js
index cd2bb1b..7c08182 100644
--- a/static/js/ajax.js
+++ b/static/js/ajax.js
@@ -14,7 +14,7 @@ function getForm(form) {
case 'textarea':
// Check if it's required
if (element.title == 'required' && element.value == '') {
- alert('Error: The ' + element.name + ' field is required.');
+ alert('Error: The ' + element.name.replace('_', ' ') + ' field is required.');
element.focus();
return false;
}
@@ -60,7 +60,7 @@ function createRequest() {
function ajaxSubmit(form) {
var params = '';
-
+
if (params = getForm(form)) {
createRequest();
request.open(form.method, form.action, true);