From e5a51fa99e8358a0eaa012e789c968306c4706c3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 17 Aug 2015 15:42:31 -0700 Subject: [PATCH] Contact form template upgraded to use Bootstrap markup. --- contact.php | 11 +++-- .../shortcodes/batch/contact_shortcodes.php | 8 ++-- e107_core/templates/contact_template.php | 47 ++++++++++--------- e107_core/templates/email_template.php | 1 + e107_themes/bootstrap3/admin_style.css | 9 ++-- 5 files changed, 42 insertions(+), 34 deletions(-) diff --git a/contact.php b/contact.php index 50de803f6..89533cfa9 100644 --- a/contact.php +++ b/contact.php @@ -110,11 +110,14 @@ if(isset($_POST['send-contactus'])) // No errors - so proceed to email the admin and the user (if selected). if(empty($error)) { - $body .= "\n\nIP:\t".e107::getIPHandler()->getIP(TRUE)."\n"; + $body .= "

+ + + "; if (USER) { - $body .= "User:\t#".USERID." ".USERNAME."\n"; + $body .= ""; } if(empty($_POST['contact_person']) && !empty($pref['sitecontacts'])) // only 1 person, so contact_person not posted. @@ -160,10 +163,12 @@ if(isset($_POST['send-contactus'])) { foreach($_POST as $k=>$v) { - $body .= $k.":\t".$tp->toEmail($v, true,'RAWTEXT')."\n"; + $body .= ""; } } + $body .= "
IP:".e107::getIPHandler()->getIP(TRUE)."
User:#".USERID." ".USERNAME."
".$k.":".$tp->toEmail($v, true,'RAWTEXT')."
"; + if(!empty($CONTACT_EMAIL['subject'])) { $vars = array('CONTACT_SUBJECT'=>$subject,'CONTACT_PERSON'=>$send_to_name); diff --git a/e107_core/shortcodes/batch/contact_shortcodes.php b/e107_core/shortcodes/batch/contact_shortcodes.php index 3a1d84c3d..c40a8a2ab 100644 --- a/e107_core/shortcodes/batch/contact_shortcodes.php +++ b/e107_core/shortcodes/batch/contact_shortcodes.php @@ -92,7 +92,7 @@ class contact_shortcodes extends e_shortcode { $userName = deftrue('USERNAME'); - return ""; + return ""; } @@ -103,14 +103,14 @@ class contact_shortcodes extends e_shortcode $userEmail = deftrue('USEREMAIL'); $disabled = (!empty($userEmail)) ? 'readonly' : ''; // don't allow change from a verified email address. - return ""; + return ""; } function sc_contact_subject($parm='') { - return ""; + return ""; } @@ -125,7 +125,7 @@ class contact_shortcodes extends e_shortcode $size = 'input-xxlarge'; } - return ""; + return ""; } diff --git a/e107_core/templates/contact_template.php b/e107_core/templates/contact_template.php index 8c4ea82cc..370f4fecb 100644 --- a/e107_core/templates/contact_template.php +++ b/e107_core/templates/contact_template.php @@ -60,37 +60,38 @@ $CONTACT_TEMPLATE['menu'] = ' // In this case (see contact.php) e107::getScBatch('contact')->wrapper('contact/form') // Only one Option is used - WRAPPER > SC_STYLE - $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "".LAN_ENTER_CODE."
{---}"; - $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}"; - $CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "{---}".LANCONTACT_07.""; - $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "".LANCONTACT_14."
{---}"; + $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "
{---}"; + $CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}
"; + $CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "
{---}".LANCONTACT_07."
"; + $CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "
{---}
"; $CONTACT_TEMPLATE['form'] = "
- + {CONTACT_PERSON} - - - - {CONTACT_EMAIL_COPY} - +
+ {CONTACT_NAME} +
+
+ {CONTACT_EMAIL} +
+
+ {CONTACT_SUBJECT} +
+ + {CONTACT_EMAIL_COPY} + +
+ {CONTACT_BODY} +
+ {CONTACT_IMAGECODE} {CONTACT_IMAGECODE_INPUT} - -
".LANCONTACT_03."
- {CONTACT_NAME} -
".LANCONTACT_04."
- {CONTACT_EMAIL} -
- ".LANCONTACT_05."
- {CONTACT_SUBJECT} -
- ".LANCONTACT_06."
- {CONTACT_BODY} -
+
{CONTACT_SUBMIT_BUTTON} -
+ +
"; // Customize the email subject diff --git a/e107_core/templates/email_template.php b/e107_core/templates/email_template.php index 4add9a3b7..b64bd108f 100644 --- a/e107_core/templates/email_template.php +++ b/e107_core/templates/email_template.php @@ -119,6 +119,7 @@ $EMAIL_TEMPLATE['default']['header'] = " tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th { background-color: #F9F9F9; diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index 46eb19484..94e856aad 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -987,14 +987,14 @@ h4.caption { margin-bottom:30px; } .block-text h2.caption { display: block; position: relative; font-size: 22px; text-align: left; margin-bottom: 20px;} .plupload_container { - padding:0px; + padding:0; margin: 10px 20px; background: transparent; } .plupload_header { background: transparent } -.plupload_header_content { background: transparent; padding-left:0px; min-height:30px; } +.plupload_header_content { background: transparent; padding-left:0; min-height:30px; } .plupload_wrapper { font: inherit; } .plupload_header_title { display: none; } @@ -1046,12 +1046,13 @@ li.plupload_delete a { background: url(images/adminicons_16.png) no-repeat top left; display:inline-block; - width:17px; height:16px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; - background-position: -525px 0; width: 16px; height: 16px; + background-position: -525px 0; + width: 16px; + } li.rssRow > div {