1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 22:27:34 +02:00

Simple 'Contact Us' menu item. Needs security image and other options added. Ajax posting?

This commit is contained in:
Cameron
2013-03-06 15:04:12 -08:00
parent c4fa286ddf
commit 3ec05a1d12
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
if (!defined('e107_INIT')) { exit; }
$head = '<form id="contact-menu" action="'.e_BASE.'contact.php" method="post" >';
//XXX Template must conform to Bootstrap specs: http://twitter.github.com/bootstrap/base-css.html#forms
//TODO Security Image.
$template = '
<div>
<div class="control-group">
<label >Name</label>
{CONTACT_NAME}
</div>
<div class="control-group">
<label class="control-label" for="contactEmail">Email</label>
{CONTACT_EMAIL}
</div>
<div class="control-group">
<label>Comments</label>
{CONTACT_BODY=rows=5&cols=50}
</div>
{CONTACT_SUBMIT_BUTTON}
</div>
';
$foot = '</form>';
$contact_shortcodes = e107::getScBatch('contact');
$text = $tp->parseTemplate($head. $template . $foot, true, $contact_shortcodes);
$ns->tablerender("Contact Us", $text, 'contact-menu');
?>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<e107Plugin name="Contact" version="1.0" date="2012-12-01" compatibility="2.0" installRequired="false" >
<category>menu</category>
</e107Plugin>