Poprawki w strukturze html (komentarze, admin panel)
This commit is contained in:
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace inContact;
|
namespace inContact;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Klasa Menus
|
* Klasa Menus
|
||||||
*
|
*
|
||||||
@@ -14,7 +12,6 @@ namespace inContact;
|
|||||||
*/
|
*/
|
||||||
class AdminMenu
|
class AdminMenu
|
||||||
{
|
{
|
||||||
|
|
||||||
use Singleton;
|
use Singleton;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
@@ -24,99 +21,153 @@ class AdminMenu
|
|||||||
|
|
||||||
protected function setupHooks()
|
protected function setupHooks()
|
||||||
{
|
{
|
||||||
add_action('admin_menu', [$this, 'InContactAdminMenu']);
|
add_action("admin_menu", [$this, "InContactAdminMenu"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function InContactAdminMenu($id)
|
public function InContactAdminMenu($id)
|
||||||
{
|
{
|
||||||
add_menu_page('ustawienia inContact', 'inContact', 'manage_options', 'wp-in-contact', array(
|
add_menu_page(
|
||||||
$this,
|
"ustawienia inContact",
|
||||||
'InContactSettings'
|
"inContact",
|
||||||
), 'dashicons-email', 100);
|
"manage_options",
|
||||||
|
"wp-in-contact",
|
||||||
|
[$this, "InContactSettings"],
|
||||||
|
"dashicons-email",
|
||||||
|
100,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function InContactSettings()
|
public function InContactSettings()
|
||||||
{
|
{
|
||||||
$updated = isset($_POST['updated']) ? $_POST['updated'] : '';
|
$updated = isset($_POST["updated"]) ? $_POST["updated"] : "";
|
||||||
$incontactconfig = isset($_REQUEST['incontact-config']) ? $_REQUEST['incontact-config'] : '';
|
$incontactconfig = isset($_REQUEST["incontact-config"])
|
||||||
if ($updated === 'true' || wp_verify_nonce($incontactconfig, 'incontact-update')) {
|
? $_REQUEST["incontact-config"]
|
||||||
update_option('incontact-site-key', $_POST['incontact-site-key']);
|
: "";
|
||||||
update_option('incontact-secret-key', $_POST['incontact-secret-key']);
|
if (
|
||||||
update_option('incontact-target-mail', $_POST['incontact-target-mail']);
|
$updated === "true" ||
|
||||||
update_option('incontact-form-ph-name', $_POST['incontact-form-ph-name']);
|
wp_verify_nonce($incontactconfig, "incontact-update")
|
||||||
update_option('incontact-form-ph-email', $_POST['incontact-form-ph-email']);
|
) {
|
||||||
update_option('incontact-form-ph-message', $_POST['incontact-form-ph-message']);
|
|
||||||
update_option('incontact-form-name', $_POST['incontact-form-name']);
|
update_option("incontact-site-key", $_POST["incontact-site-key"]);
|
||||||
update_option('incontact-form-email', $_POST['incontact-form-email']);
|
update_option(
|
||||||
update_option('incontact-form-message', $_POST['incontact-form-message']);
|
"incontact-secret-key",
|
||||||
update_option('incontact-form-snd-ok', $_POST['incontact-form-snd-ok']);
|
$_POST["incontact-secret-key"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-target-mail",
|
||||||
|
$_POST["incontact-target-mail"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-ph-name",
|
||||||
|
$_POST["incontact-form-ph-name"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-ph-email",
|
||||||
|
$_POST["incontact-form-ph-email"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-ph-message",
|
||||||
|
$_POST["incontact-form-ph-message"],
|
||||||
|
);
|
||||||
|
update_option("incontact-form-name", $_POST["incontact-form-name"]);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-email",
|
||||||
|
$_POST["incontact-form-email"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-message",
|
||||||
|
$_POST["incontact-form-message"],
|
||||||
|
);
|
||||||
|
update_option(
|
||||||
|
"incontact-form-snd-ok",
|
||||||
|
$_POST["incontact-form-snd-ok"],
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="updated">
|
<div class="updated">
|
||||||
<p>Ustawienia zostały zapisane!</p>
|
<p>Ustawienia zostały zapisane!</p>
|
||||||
</div> <?php
|
</div> <?php
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><span class="dashicons dashicons-email"></span> InContact - Ustawienia</h2>
|
<h2><span class="dashicons dashicons-email"></span> InContact - Ustawienia</h2>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="hidden" name="updated" value="true"/>
|
<input type="hidden" name="updated" value="true"/>
|
||||||
<?php wp_nonce_field('incontact-update', 'incontact-config'); ?>
|
<?php wp_nonce_field("incontact-update", "incontact-config"); ?>
|
||||||
<table class="form-table">
|
<table class="form-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-site-key">Klucz witryny</label></th>
|
<th><label for="incontact-site-key">Klucz witryny</label></th>
|
||||||
<td><input name="incontact-site-key" id="incontact-site-key" type="text"
|
<td><input name="incontact-site-key" id="incontact-site-key" type="text"
|
||||||
value="<?php echo get_option('incontact-site-key'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-site-key",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-secret-key">Tajny klucz</label></th>
|
<th><label for="incontact-secret-key">Tajny klucz</label></th>
|
||||||
<td><input name="incontact-secret-key" id="incontact-secret-key" type="text"
|
<td><input name="incontact-secret-key" id="incontact-secret-key" type="text"
|
||||||
value="<?php echo get_option('incontact-secret-key'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-secret-key",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-target-mail">Adresat (email)</label></th>
|
<th><label for="incontact-target-mail">Adresat (email)</label></th>
|
||||||
<td><input name="incontact-target-mail" id="incontact-target-mail" type="text"
|
<td><input name="incontact-target-mail" id="incontact-target-mail" type="text"
|
||||||
value="<?php echo get_option('incontact-target-mail'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-target-mail",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-ph-name">Formularz - placeholder nazwa</label></th>
|
<th><label for="incontact-form-ph-name">Formularz - placeholder nazwa</label></th>
|
||||||
<td><input name="incontact-form-ph-name" id="incontact-form-ph-name" type="text"
|
<td><input name="incontact-form-ph-name" id="incontact-form-ph-name" type="text"
|
||||||
value="<?php echo get_option('incontact-form-ph-name'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-ph-name",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-ph-email">Formularz - placeholder email</label></th>
|
<th><label for="incontact-form-ph-email">Formularz - placeholder email</label></th>
|
||||||
<td><input name="incontact-form-ph-email" id="incontact-form-ph-email" type="text"
|
<td><input name="incontact-form-ph-email" id="incontact-form-ph-email" type="text"
|
||||||
value="<?php echo get_option('incontact-form-ph-email'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-ph-email",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-ph-message">Formularz - placeholder wiadomość</label></th>
|
<th><label for="incontact-form-ph-message">Formularz - placeholder wiadomość</label></th>
|
||||||
<td><input name="incontact-form-ph-message" id="incontact-form-ph-message" type="text"
|
<td><input name="incontact-form-ph-message" id="incontact-form-ph-message" type="text"
|
||||||
value="<?php echo get_option('incontact-form-ph-message'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-ph-message",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-name">Formularz - nazwa nazwa</label></th>
|
<th><label for="incontact-form-name">Formularz - nazwa nazwa</label></th>
|
||||||
<td><input name="incontact-form-name" id="incontact-form-name" type="text"
|
<td><input name="incontact-form-name" id="incontact-form-name" type="text"
|
||||||
value="<?php echo get_option('incontact-form-name'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-name",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-email">Formularz - nazwa email</label></th>
|
<th><label for="incontact-form-email">Formularz - nazwa email</label></th>
|
||||||
<td><input name="incontact-form-email" id="incontact-form-email" type="text"
|
<td><input name="incontact-form-email" id="incontact-form-email" type="text"
|
||||||
value="<?php echo get_option('incontact-form-email'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-email",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-message">Formularz - nazwa wiadomość</label></th>
|
<th><label for="incontact-form-message">Formularz - nazwa wiadomość</label></th>
|
||||||
<td><input name="incontact-form-message" id="incontact-form-message" type="text"
|
<td><input name="incontact-form-message" id="incontact-form-message" type="text"
|
||||||
value="<?php echo get_option('incontact-form-message'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-message",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="incontact-form-snd-ok">Formularz - wiadomość wysłana popprawnie</label></th>
|
<th><label for="incontact-form-snd-ok">Formularz - wiadomość wysłana popprawnie</label></th>
|
||||||
<td><input name="incontact-form-snd-ok" id="incontact-form-snd-ok" type="text"
|
<td><input name="incontact-form-snd-ok" id="incontact-form-snd-ok" type="text"
|
||||||
value="<?php echo get_option('incontact-form-snd-ok'); ?>" class="regular-text"/></td>
|
value="<?php echo get_option(
|
||||||
|
"incontact-form-snd-ok",
|
||||||
|
); ?>" class="regular-text"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -125,6 +176,5 @@ class AdminMenu
|
|||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div> <?php
|
</div> <?php
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace inContact;
|
namespace inContact;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Klasa Menus
|
* Klasa Menus
|
||||||
*
|
*
|
||||||
@@ -14,7 +12,6 @@ namespace inContact;
|
|||||||
*/
|
*/
|
||||||
class Shortcode
|
class Shortcode
|
||||||
{
|
{
|
||||||
|
|
||||||
use Singleton;
|
use Singleton;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
@@ -22,15 +19,11 @@ class Shortcode
|
|||||||
$this->addShortcode();
|
$this->addShortcode();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addShortcode()
|
protected function addShortcode(): void
|
||||||
{
|
{
|
||||||
add_shortcode('in-contact', array(
|
add_shortcode("in-contact", [$this, "inContact"]);
|
||||||
$this,
|
|
||||||
'inContact'
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function inContact($atts)
|
public function inContact($atts)
|
||||||
{
|
{
|
||||||
$em_name = null;
|
$em_name = null;
|
||||||
@@ -42,32 +35,47 @@ class Shortcode
|
|||||||
$body = null;
|
$body = null;
|
||||||
$telefon = null;
|
$telefon = null;
|
||||||
$mailResult = 0;
|
$mailResult = 0;
|
||||||
$form_submitted = ($_SERVER['REQUEST_METHOD'] === 'POST');
|
$form_submitted = $_SERVER["REQUEST_METHOD"] === "POST";
|
||||||
|
|
||||||
if(!empty($_POST['website'])) die();
|
if (!empty($_POST["website"])) {
|
||||||
|
die();
|
||||||
|
}
|
||||||
if ($form_submitted) {
|
if ($form_submitted) {
|
||||||
$emmsg = (isset($_POST['emmsg']) ? $_POST['emmsg'] : '');
|
$emmsg = isset($_POST["emmsg"]) ? $_POST["emmsg"] : "";
|
||||||
|
|
||||||
if(!empty($_POST['em_name'])) { $em_name = $_POST['em_name']; } else {
|
if (!empty($_POST["em_name"])) {
|
||||||
$error .= 'Please enter your name </br>';
|
$em_name = $_POST["em_name"];
|
||||||
|
} else {
|
||||||
|
$error .= "Please enter your name </br>";
|
||||||
}
|
}
|
||||||
if(!empty($_POST['em_mail'])) { $em_mail = $_POST['em_mail']; } else {
|
if (!empty($_POST["em_mail"])) {
|
||||||
$error .= 'Please enter your email address </br>';
|
$em_mail = $_POST["em_mail"];
|
||||||
|
} else {
|
||||||
|
$error .= "Please enter your email address </br>";
|
||||||
}
|
}
|
||||||
if(!empty($_POST['em_message'])) { $em_message = $_POST['em_message']; } else {
|
if (!empty($_POST["em_message"])) {
|
||||||
$error .= 'Please enter your message </br>';
|
$em_message = $_POST["em_message"];
|
||||||
|
} else {
|
||||||
|
$error .= "Please enter your message </br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$targetEmail = 'To: Tylkofotografia <' .get_option('incontact-target-mail') .'>';
|
$targetEmail =
|
||||||
|
"To: Tylkofotografia <" .
|
||||||
|
get_option("incontact-target-mail") .
|
||||||
|
">";
|
||||||
$mailResult = 0;
|
$mailResult = 0;
|
||||||
$headers = "MIME-Version: 1.0" . "\r\n";
|
$headers = "MIME-Version: 1.0" . "\r\n";
|
||||||
$headers .= "Content-type: text/html; charset=".get_bloginfo('charset')."" . "\r\n";
|
$headers .=
|
||||||
$headers .= "From: " . $em_name ." <".$em_mail.">" . "\r\n";
|
"Content-type: text/html; charset=" .
|
||||||
$headers = array(
|
get_bloginfo("charset") .
|
||||||
'Content-Type: text/html; charset=UTF-8',
|
"" .
|
||||||
'From: ' . $em_name . ' <'.$em_mail.'>',
|
"\r\n";
|
||||||
'Reply-To: ' . $em_name . ' <'.$em_mail.'>'
|
$headers .= "From: " . $em_name . " <" . $em_mail . ">" . "\r\n";
|
||||||
);
|
$headers = [
|
||||||
|
"Content-Type: text/html; charset=UTF-8",
|
||||||
|
"From: " . $em_name . " <" . $em_mail . ">",
|
||||||
|
"Reply-To: " . $em_name . " <" . $em_mail . ">",
|
||||||
|
];
|
||||||
$body = '<!DOCTYPE html>
|
$body = '<!DOCTYPE html>
|
||||||
<html lang="pl">
|
<html lang="pl">
|
||||||
<head>
|
<head>
|
||||||
@@ -158,30 +166,42 @@ class Shortcode
|
|||||||
</html>
|
</html>
|
||||||
';
|
';
|
||||||
$body = str_replace(
|
$body = str_replace(
|
||||||
['{{IMIE_NAZWISKO}}', '{{EMAIL}}', '{{TELEFON}}', '{{WIADOMOSC}}', '{{ROK}}'],
|
[
|
||||||
[$em_name, $em_mail, $telefon, str_replace(array("\r\n", "\r", "\n"), "<br />", $em_message), date("Y")],
|
"{{IMIE_NAZWISKO}}",
|
||||||
$body
|
"{{EMAIL}}",
|
||||||
) ;
|
"{{TELEFON}}",
|
||||||
$gRecaptchaResponse = (isset($_POST['g-recaptcha-response']) ? $_POST['g-recaptcha-response'] : '');
|
"{{WIADOMOSC}}",
|
||||||
|
"{{ROK}}",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
$em_name,
|
||||||
|
$em_mail,
|
||||||
|
$telefon,
|
||||||
|
str_replace(["\r\n", "\r", "\n"], "<br />", $em_message),
|
||||||
|
date("Y"),
|
||||||
|
],
|
||||||
|
$body,
|
||||||
|
);
|
||||||
|
$gRecaptchaResponse = isset($_POST["g-recaptcha-response"])
|
||||||
|
? $_POST["g-recaptcha-response"]
|
||||||
|
: "";
|
||||||
|
|
||||||
if (!empty($error)) {
|
if (!empty($error)) {
|
||||||
$html .= '<div class="alert alert-success" role="alert">' . $error . '</div>';
|
$html .=
|
||||||
|
'<div class="alert alert-success" role="alert">' .
|
||||||
} elseif ($emmsg == 'true')
|
$error .
|
||||||
{
|
"</div>";
|
||||||
|
} elseif ($emmsg == "true") {
|
||||||
$secret = get_option('incontact-secret-key');
|
$secret = get_option("incontact-secret-key");
|
||||||
$response = null;
|
$response = null;
|
||||||
if (get_option('incontact-site-key') != '')
|
if (get_option("incontact-site-key") != "") {
|
||||||
{
|
|
||||||
$reCaptcha = new \ReCaptcha\ReCaptcha($secret);
|
$reCaptcha = new \ReCaptcha\ReCaptcha($secret);
|
||||||
$resp = $reCaptcha->setExpectedHostname($_SERVER['SERVER_NAME'])->verify($gRecaptchaResponse, $_SERVER['REMOTE_ADDR']);
|
$resp = $reCaptcha
|
||||||
if ($resp->isSuccess())
|
->setExpectedHostname($_SERVER["SERVER_NAME"])
|
||||||
{
|
->verify($gRecaptchaResponse, $_SERVER["REMOTE_ADDR"]);
|
||||||
|
if ($resp->isSuccess()) {
|
||||||
$canSend = true;
|
$canSend = true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$errors = $resp->getErrorCodes();
|
$errors = $resp->getErrorCodes();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -189,54 +209,73 @@ class Shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($canSend) {
|
if ($canSend) {
|
||||||
$mailResult = wp_mail($targetEmail, $em_name, $body, $headers);
|
$mailResult = wp_mail(
|
||||||
|
$targetEmail,
|
||||||
|
$em_name,
|
||||||
|
$body,
|
||||||
|
$headers,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wp_enqueue_style("ContactCss", plugins_url("/css/cform.css", __FILE__));
|
||||||
|
|
||||||
}
|
if (get_option("incontact-site-key") != "") {
|
||||||
}
|
$html .=
|
||||||
wp_enqueue_style('ContactCss', plugins_url( '/css/cform.css', __FILE__ ));
|
'<script src="https://www.google.com/recaptcha/api.js"></script>
|
||||||
|
|
||||||
if (get_option('incontact-site-key') != '')
|
|
||||||
{
|
|
||||||
$html .= '<script src="https://www.google.com/recaptcha/api.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){window.setTimeout(function(){$(".alert").fadeTo(500,0).slideUp(500,function(){$(this).remove()})},2e3)}),$(document).ready(function(){"use strict";window.addEventListener("load",function(){var t=document.getElementsByClassName("needs-validation");Array.prototype.filter.call(t,function(t){t.addEventListener("submit",function(e){!1===t.checkValidity()&&(e.preventDefault(),e.stopPropagation()),t.classList.add("was-validated")},!1)})},!1)})();
|
$(document).ready(function(){window.setTimeout(function(){$(".alert").fadeTo(500,0).slideUp(500,function(){$(this).remove()})},2e3)}),$(document).ready(function(){"use strict";window.addEventListener("load",function(){var t=document.getElementsByClassName("needs-validation");Array.prototype.filter.call(t,function(t){t.addEventListener("submit",function(e){!1===t.checkValidity()&&(e.preventDefault(),e.stopPropagation()),t.classList.add("was-validated")},!1)})},!1)})();
|
||||||
</script>'."\n";
|
</script>' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '<div class="row justify-content-md-center">
|
$html .= '<div class="row justify-content-md-center">
|
||||||
<div class="col-12">';
|
<div class="col-12">';
|
||||||
if ($mailResult == 1)
|
if ($mailResult == 1) {
|
||||||
{
|
$html .=
|
||||||
$html .= '<div class="alert alert-success" role="alert">' . get_option('incontact-form-snd-ok') . '</div>';
|
'<div class="alert alert-success" role="alert">' .
|
||||||
|
get_option("incontact-form-snd-ok") .
|
||||||
|
"</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= '<div class="jumbotron"><form action="" class="needs-validation" novalidate method="post" id="demo-form">
|
$html .=
|
||||||
|
'<div class="jumbotron"><form action="" class="needs-validation" novalidate method="post" id="demo-form">
|
||||||
<input type="hidden" name="emmsg" value="true" />
|
<input type="hidden" name="emmsg" value="true" />
|
||||||
<input type="text" id="website" name="website" />
|
<input type="text" id="website" name="website" />
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name" class="col-2 control-label">' . get_option('incontact-form-name') . '</label>
|
<label for="name" class="col-2 control-label">' .
|
||||||
|
get_option("incontact-form-name") .
|
||||||
|
'</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<input type="text" class="form-control" id="name" name="em_name" placeholder="' . get_option('incontact-form-ph-name') . '" value="" required>
|
<input type="text" class="form-control" id="name" name="em_name" placeholder="' .
|
||||||
|
get_option("incontact-form-ph-name") .
|
||||||
|
'" value="" required>
|
||||||
<div class="invalid-feedback">
|
<div class="invalid-feedback">
|
||||||
Please enter your name!
|
Please enter your name!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="email" class="col-2 control-label">' . get_option('incontact-form-email') . '</label>
|
<label for="email" class="col-2 control-label">' .
|
||||||
|
get_option("incontact-form-email") .
|
||||||
|
'</label>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<input type="email" class="form-control" id="email" name="em_mail" placeholder="' . get_option('incontact-form-ph-email') . '" value="" required>
|
<input type="email" class="form-control" id="email" name="em_mail" placeholder="' .
|
||||||
|
get_option("incontact-form-ph-email") .
|
||||||
|
'" value="" required>
|
||||||
<div class="invalid-feedback">
|
<div class="invalid-feedback">
|
||||||
Please enter your email address!
|
Please enter your email address!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<p class="col-2 control-label">' . get_option('incontact-form-message') . '</p>
|
<p class="col-2 control-label">' .
|
||||||
|
get_option("incontact-form-message") .
|
||||||
|
'</p>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<textarea class="form-control" rows="4" name="em_message" placeholder="' . get_option('incontact-form-ph-message') . '" required></textarea>
|
<textarea class="form-control" rows="4" name="em_message" placeholder="' .
|
||||||
|
get_option("incontact-form-ph-message") .
|
||||||
|
'" required></textarea>
|
||||||
<div class="invalid-feedback">
|
<div class="invalid-feedback">
|
||||||
Please enter your message!
|
Please enter your message!
|
||||||
</div>
|
</div>
|
||||||
@@ -244,7 +283,9 @@ class Shortcode
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<div class="g-recaptcha" data-sitekey="' . get_option('incontact-site-key') . '"></div>
|
<div class="g-recaptcha" data-sitekey="' .
|
||||||
|
get_option("incontact-site-key") .
|
||||||
|
'"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -262,7 +303,4 @@ class Shortcode
|
|||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user