mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Contact form template upgraded to use Bootstrap markup.
This commit is contained in:
parent
c06a3ff5c3
commit
e5a51fa99e
11
contact.php
11
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 .= "<br /><br />
|
||||
<table class='table'>
|
||||
<tr>
|
||||
<td>IP:</td><td>".e107::getIPHandler()->getIP(TRUE)."</td></tr>";
|
||||
|
||||
if (USER)
|
||||
{
|
||||
$body .= "User:\t#".USERID." ".USERNAME."\n";
|
||||
$body .= "<tr><td>User:</td><td>#".USERID." ".USERNAME."</td></tr>";
|
||||
}
|
||||
|
||||
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 .= "<tr><td>".$k.":</td><td>".$tp->toEmail($v, true,'RAWTEXT')."</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$body .= "</table>";
|
||||
|
||||
if(!empty($CONTACT_EMAIL['subject']))
|
||||
{
|
||||
$vars = array('CONTACT_SUBJECT'=>$subject,'CONTACT_PERSON'=>$send_to_name);
|
||||
|
@ -92,7 +92,7 @@ class contact_shortcodes extends e_shortcode
|
||||
{
|
||||
$userName = deftrue('USERNAME');
|
||||
|
||||
return "<input type='text' style='max-width:99%' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['author_name'],$userName)."\" />";
|
||||
return "<input type='text' id='contactName' title='Your full name' name='author_name' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['author_name'],$userName)."\" />";
|
||||
|
||||
}
|
||||
|
||||
@ -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 "<input type='email' style='max-width:99%' ".$disabled." id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox form-control' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
return "<input type='email' ".$disabled." id='contactEmail' title='a valid email address' name='email_send' required='required' size='30' class='tbox form-control' value='".(vartrue($_POST['email_send']) ? $_POST['email_send'] : USEREMAIL)."' />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
function sc_contact_subject($parm='')
|
||||
{
|
||||
return "<input type='text' style='max-width:99%' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
|
||||
return "<input type='text' title='the subject of your enquiry' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
|
||||
}
|
||||
|
||||
|
||||
@ -125,7 +125,7 @@ class contact_shortcodes extends e_shortcode
|
||||
$size = 'input-xxlarge';
|
||||
}
|
||||
|
||||
return "<textarea cols='{$cols}' style='max-width:99%' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' name='body' required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
|
||||
}
|
||||
|
||||
|
||||
|
@ -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'] = "<tr><td>".LAN_ENTER_CODE."<br />{---}";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<tr><td>{---}".LANCONTACT_07."</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<tr><td>".LANCONTACT_14."<br />{---}</td></tr>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<div class='control-group form-group'><label>".LAN_ENTER_CODE."</label>{---}";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE_INPUT'] = "{---}</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<div class='control-group form-group'>{---}".LANCONTACT_07."</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<div class='control-group form-group'><label>".LANCONTACT_14."</label>{---}</div>";
|
||||
|
||||
$CONTACT_TEMPLATE['form'] = "
|
||||
<form action='".e_SELF."' method='post' id='contactForm' >
|
||||
<table class='table'>
|
||||
|
||||
{CONTACT_PERSON}
|
||||
<tr><td>".LANCONTACT_03."<br />
|
||||
{CONTACT_NAME}
|
||||
</td></tr>
|
||||
<tr><td>".LANCONTACT_04."<br />
|
||||
{CONTACT_EMAIL}
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
".LANCONTACT_05."<br />
|
||||
{CONTACT_SUBJECT}
|
||||
</td></tr>
|
||||
{CONTACT_EMAIL_COPY}
|
||||
<tr><td>
|
||||
".LANCONTACT_06."<br />
|
||||
{CONTACT_BODY}
|
||||
</td></tr>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_03."</label>
|
||||
{CONTACT_NAME}
|
||||
</div>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_04."</label>
|
||||
{CONTACT_EMAIL}
|
||||
</div>
|
||||
<div class='control-group form-group'><label>".LANCONTACT_05."</label>
|
||||
{CONTACT_SUBJECT}
|
||||
</div>
|
||||
|
||||
{CONTACT_EMAIL_COPY}
|
||||
|
||||
<div class='control-group form-group'><label>".LANCONTACT_06."</label>
|
||||
{CONTACT_BODY}
|
||||
</div>
|
||||
|
||||
{CONTACT_IMAGECODE}
|
||||
{CONTACT_IMAGECODE_INPUT}
|
||||
|
||||
<tr><td>
|
||||
<div class='form-group'>
|
||||
{CONTACT_SUBMIT_BUTTON}
|
||||
</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>";
|
||||
|
||||
// Customize the email subject
|
||||
|
@ -119,6 +119,7 @@ $EMAIL_TEMPLATE['default']['header'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHT
|
||||
table.table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width:100%;
|
||||
}
|
||||
.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th {
|
||||
background-color: #F9F9F9;
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user