mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 18:14:26 +02:00
Contact LANs updated to v2 specifications. BC fix included.
This commit is contained in:
@@ -92,7 +92,7 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
/* example {CONTACT_NAME} */
|
||||
/* example {CONTACT_NAME: class=form-control} */
|
||||
/* example {CONTACT_NAME: class=col-md-12&placeholder=".LANCONTACT_03." *} */
|
||||
/* example {CONTACT_NAME: class=col-md-12&placeholder=".LAN_CONTACT_03." *} */
|
||||
|
||||
function sc_contact_name($parm=null)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ class contact_shortcodes extends e_shortcode
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
|
||||
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
|
||||
$value = !empty($_POST['author_name']) ? e107::getParser()->filter( $_POST['author_name']) : $userName;
|
||||
return "<input type='text' id='contactName' title='".LANCONTACT_17."' aria-label='".LANCONTACT_17."' aria-labelledby='contactName' name='author_name' required='required' size='30' ".$placeholder." class='".$class."' value=\"".$value."\" />";
|
||||
return "<input type='text' id='contactName' title='".LAN_CONTACT_17."' aria-label='".LAN_CONTACT_17."' aria-labelledby='contactName' name='author_name' required='required' size='30' ".$placeholder." class='".$class."' value=\"".$value."\" />";
|
||||
}
|
||||
|
||||
function sc_contact_map($parm=null)
|
||||
@@ -174,7 +174,7 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
/* example {CONTACT_EMAIL} */
|
||||
/* example {CONTACT_EMAIL: class=form-control} */
|
||||
/* example {CONTACT_EMAIL: class=col-md-12&placeholder=".LANCONTACT_04." *} */
|
||||
/* example {CONTACT_EMAIL: class=col-md-12&placeholder=".LAN_CONTACT_04." *} */
|
||||
|
||||
function sc_contact_email($parm=null)
|
||||
{
|
||||
@@ -184,21 +184,21 @@ class contact_shortcodes extends e_shortcode
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
|
||||
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
|
||||
$value = !empty($_POST['email_send'] ) ? e107::getParser()->filter($_POST['email_send'],'email') : USEREMAIL;
|
||||
return "<input type='email' ".$disabled." id='contactEmail' title='".LANCONTACT_18."' aria-label='".LANCONTACT_18."' aria-labelledby='contactEmail' name='email_send' required='required' size='30' ".$placeholder." class='".$class."' value='".$value."' />";
|
||||
return "<input type='email' ".$disabled." id='contactEmail' title='".LAN_CONTACT_18."' aria-label='".LAN_CONTACT_18."' aria-labelledby='contactEmail' name='email_send' required='required' size='30' ".$placeholder." class='".$class."' value='".$value."' />";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* example {CONTACT_SUBJECT} */
|
||||
/* example {CONTACT_SUBJECT: class=form-control} */
|
||||
/* example {CONTACT_SUBJECT: class=col-md-12&placeholder=".LANCONTACT_05." *} */
|
||||
/* example {CONTACT_SUBJECT: class=col-md-12&placeholder=".LAN_CONTACT_05." *} */
|
||||
|
||||
function sc_contact_subject($parm=null)
|
||||
{
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : 'tbox form-control';
|
||||
$placeholder = (!empty($parm['placeholder'])) ? " placeholder= '".$parm['placeholder']."'" : '';
|
||||
$value = !empty($_POST['subject']) ? e107::getParser()->filter($_POST['subject']) : '';
|
||||
return "<input type='text' id='contactSubject' title='".LANCONTACT_19."' aria-label='".LANCONTACT_19."' aria-labelledby='contactSubject' name='subject' required='required' size='30' ".$placeholder." class='".$class."' value=\"".$value."\" />";
|
||||
return "<input type='text' id='contactSubject' title='".LAN_CONTACT_19."' aria-label='".LAN_CONTACT_19."' aria-labelledby='contactSubject' name='subject' required='required' size='30' ".$placeholder." class='".$class."' value=\"".$value."\" />";
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ class contact_shortcodes extends e_shortcode
|
||||
|
||||
$value = !empty($_POST['body']) ? stripslashes($_POST['body']) : '';
|
||||
|
||||
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' title='".LANCONTACT_20."' aria-label='".LANCONTACT_20."' aria-labelledby='contactBody' name='body' ".$placeholder." required='required' class='".$class."'>".$value."</textarea>";
|
||||
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' title='".LAN_CONTACT_20."' aria-label='".LAN_CONTACT_20."' aria-labelledby='contactBody' name='body' ".$placeholder." required='required' class='".$class."'>".$value."</textarea>";
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ class contact_shortcodes extends e_shortcode
|
||||
{
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : 'btn btn-primary button';
|
||||
|
||||
return "<input type='submit' name='send-contactus' value=\"".LANCONTACT_08."\" class='".$class."' />";
|
||||
return "<input type='submit' name='send-contactus' value=\"".LAN_CONTACT_08."\" class='".$class."' />";
|
||||
}
|
||||
|
||||
function sc_contact_gdpr_check($parm=null)
|
||||
@@ -250,9 +250,9 @@ class contact_shortcodes extends e_shortcode
|
||||
}
|
||||
$pp = e107::getParser()->replaceConstants($pp, 'full');
|
||||
$class = (!empty($parm['class'])) ? $parm['class'] : '';
|
||||
$link = sprintf('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LANCONTACT_22);
|
||||
$link = sprintf('<span class="%s"><a href="%s" target="_blank">%s</a></span>', $class, $pp, LAN_CONTACT_22);
|
||||
|
||||
return e107::getParser()->lanVars(LANCONTACT_23, $link);
|
||||
return e107::getParser()->lanVars(LAN_CONTACT_23, $link);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,6 @@ function lan_shortcode($parm = '')
|
||||
}
|
||||
elseif(ADMIN)
|
||||
{
|
||||
return "<span class='alert alert-danger'><strong>".$parm ."</strong> is undefined</span>"; // debug info
|
||||
return "<span class='alert alert-danger' style='padding:0'><strong>".$parm ."</strong> is undefined</span>"; // debug info
|
||||
}
|
||||
}
|
||||
|
@@ -18,9 +18,9 @@ $CONTACT_WRAPPER['info']['CONTACT_INFO: type=message'] = "<p>{---}</p>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=address'] = "<address>{GLYPH=fa-map-marker} {---}</address>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email1'] = "<div>{GLYPH=fa-envelope} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=email2'] = "<div>{GLYPH=fa-envelope} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone1'] = "<div>{GLYPH=fas-phone-alt} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone2'] = "<div>{GLYPH=fas-phone-alt} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone3'] = "<div>{GLYPH=fas-phone-alt} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone1'] = "<div>{GLYPH=fas-phone} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone2'] = "<div>{GLYPH=fas-phone} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=phone3'] = "<div>{GLYPH=fas-phone} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=fax'] = "<div>{GLYPH=fa-fax} {---}</div>";
|
||||
$CONTACT_WRAPPER['info']['CONTACT_INFO: type=hours'] = "<div>{GLYPH=fa-clock} {---}</div>";
|
||||
|
||||
@@ -59,21 +59,21 @@ $CONTACT_TEMPLATE['info'] = "
|
||||
$CONTACT_TEMPLATE['menu'] = '
|
||||
<div class="contactMenuForm">
|
||||
<div class="control-group form-group mb-3">
|
||||
<label for="contactName">'.LANCONTACT_03.'</label>
|
||||
<label for="contactName">{LAN=CONTACT_03}</label>
|
||||
{CONTACT_NAME}
|
||||
</div>
|
||||
|
||||
<div class="control-group form-group mb-3">
|
||||
<label class="control-label" for="contactEmail">'.LANCONTACT_04.'</label>
|
||||
<label class="control-label" for="contactEmail">{LAN=CONTACT_04}</label>
|
||||
{CONTACT_EMAIL}
|
||||
</div>
|
||||
<div class="control-group form-group mb-3">
|
||||
<label for="contactBody" >'.LANCONTACT_06.'</label>
|
||||
<label for="contactBody" >{LAN=CONTACT_06}</label>
|
||||
{CONTACT_BODY=rows=5&cols=30}
|
||||
</div>
|
||||
<div class="form-group mb-3"><label for="gdpr">'.LANCONTACT_24.'</label>
|
||||
<div class="form-group mb-3"><label for="gdpr">{LAN=CONTACT_24}</label>
|
||||
<div class="checkbox form-check">
|
||||
<label>{CONTACT_GDPR_CHECK} '.LANCONTACT_21.'</label>
|
||||
<label>{CONTACT_GDPR_CHECK} {LAN=CONTACT_21}</label>
|
||||
<div class="help-block">{CONTACT_GDPR_LINK}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,38 +86,37 @@ $CONTACT_TEMPLATE['menu'] = '
|
||||
// Shortcode wrappers.
|
||||
$CONTACT_WRAPPER['form']['CONTACT_IMAGECODE'] = "<div class='control-group form-group'><label for='code-verify'>{CONTACT_IMAGECODE_LABEL}</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 for='contactPerson'>".LANCONTACT_14."</label>{---}</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_EMAIL_COPY'] = "<div class='control-group form-group'>{---}{LAN=CONTACT_07}</div>";
|
||||
$CONTACT_WRAPPER['form']['CONTACT_PERSON'] = "<div class='control-group form-group'><label for='contactPerson'>{LAN=CONTACT_14}</label>{---}</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
$CONTACT_TEMPLATE['form'] = "
|
||||
<form action='".e_SELF."' method='post' id='contactForm' >
|
||||
|
||||
<form action='".e_SELF."' method='post' id='contactForm' class='mt-5' >
|
||||
{CONTACT_PERSON}
|
||||
<div class='control-group form-group'><label for='contactName'>".LANCONTACT_03."</label>
|
||||
<div class='control-group form-group'><label for='contactName'>{LAN=CONTACT_03}</label>
|
||||
{CONTACT_NAME}
|
||||
</div>
|
||||
<div class='control-group form-group'><label for='contactEmail'>".LANCONTACT_04."</label>
|
||||
<div class='control-group form-group'><label for='contactEmail'>{LAN=CONTACT_04}</label>
|
||||
{CONTACT_EMAIL}
|
||||
</div>
|
||||
<div class='control-group form-group'><label for='contactSubject'>".LANCONTACT_05."</label>
|
||||
<div class='control-group form-group'><label for='contactSubject'>{LAN=CONTACT_05}</label>
|
||||
{CONTACT_SUBJECT}
|
||||
</div>
|
||||
|
||||
{CONTACT_EMAIL_COPY}
|
||||
|
||||
<div class='control-group form-group'><label for='contactBody'>".LANCONTACT_06."</label>
|
||||
<div class='control-group form-group'><label for='contactBody'>{LAN=CONTACT_06}</label>
|
||||
{CONTACT_BODY}
|
||||
</div>
|
||||
|
||||
{CONTACT_IMAGECODE}
|
||||
{CONTACT_IMAGECODE_INPUT}
|
||||
|
||||
<div class='form-group'><label for='gdpr'>".LANCONTACT_24."</label>
|
||||
<div class='form-group'><label for='gdpr'>{LAN=CONTACT_24}</label>
|
||||
<div class='checkbox'>
|
||||
<label>{CONTACT_GDPR_CHECK} ".LANCONTACT_21."</label>
|
||||
<label>{CONTACT_GDPR_CHECK} {LAN=CONTACT_21}</label>
|
||||
<div class='help-block'>{CONTACT_GDPR_LINK}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,7 +126,6 @@ $CONTACT_TEMPLATE['form'] = "
|
||||
<div class='form-group'>
|
||||
{CONTACT_SUBMIT_BUTTON}
|
||||
</div>
|
||||
|
||||
</form>";
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user