Merge branch 'issue-1185' into next
Conflicts: public/templates/mpos/global/navigation.tpl
This commit is contained in:
commit
82efbb4609
@ -294,6 +294,13 @@ $aSettings['system'][] = array(
|
||||
'name' => 'disable_contactform', 'value' => $setting->getValue('disable_contactform'),
|
||||
'tooltip' => 'Enable or Disable Contactform. Users will not be able to use the contact form.'
|
||||
);
|
||||
$aSettings['system'][] = array(
|
||||
'display' => 'Disable Contactform for Guests', 'type' => 'select',
|
||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||
'default' => 0,
|
||||
'name' => 'disable_contactform_guest', 'value' => $setting->getValue('disable_contactform_guest'),
|
||||
'tooltip' => 'Enable or Disable Contactform for guests. Guests will not be able to use the contact form.'
|
||||
);
|
||||
$aSettings['system'][] = array(
|
||||
'display' => 'Disable Donors Page', 'type' => 'select',
|
||||
'options' => array( 0 => 'No', 1 => 'Yes'),
|
||||
|
||||
@ -6,6 +6,9 @@ if (!defined('SECURITY')) die('Hacking attempt');
|
||||
if ($setting->getValue('disable_contactform')) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||
$smarty->assign("CONTENT", "disabled.tpl");
|
||||
} else if ($setting->getValue('disable_contactform_guest') && !$user->isAuthenticated(false)) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is disabled for guests.', 'TYPE' => 'errormsg');
|
||||
$smarty->assign("CONTENT", "disabled.tpl");
|
||||
} else {
|
||||
if ($setting->getValue('recaptcha_enabled')) {
|
||||
require_once(INCLUDE_DIR . '/lib/recaptchalib.php');
|
||||
|
||||
@ -17,6 +17,8 @@ if ($setting->getValue('recaptcha_enabled')) {
|
||||
|
||||
if ($setting->getValue('disable_contactform')) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||
} else if ($setting->getValue('disable_contactform') && !$user->isAuthenticated(false)) {
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Contactform is disabled for guests.', 'TYPE' => 'errormsg');
|
||||
} else {
|
||||
// Check if recaptcha is enabled, process form data if valid
|
||||
if($setting->getValue('recaptcha_enabled') && $_POST["recaptcha_response_field"] && $_POST["recaptcha_response_field"]!=''){
|
||||
|
||||
@ -70,6 +70,8 @@ $aGlobal = array(
|
||||
'disable_payouts' => $setting->getValue('disable_payouts'),
|
||||
'disable_manual_payouts' => $setting->getValue('disable_manual_payouts'),
|
||||
'disable_auto_payouts' => $setting->getValue('disable_auto_payouts'),
|
||||
'disable_contactform' => $setting->getValue('disable_contactform'),
|
||||
'disable_contactform_guest' => $setting->getValue('disable_contactform_guest'),
|
||||
'algorithm' => $config['algorithm'],
|
||||
'target_bits' => $config['target_bits'],
|
||||
'accounts' => $config['accounts'],
|
||||
|
||||
@ -663,7 +663,7 @@ margin: 0 10px;
|
||||
fieldset label {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 200px;
|
||||
width: 250px;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
@ -72,14 +72,20 @@
|
||||
<h3>Other</h3>
|
||||
<ul class="toggle">
|
||||
{if $smarty.session.AUTHENTICATED|default:"0" == 1}
|
||||
{if !$GLOBAL.config.disable_contactform|default:"0" == 1}
|
||||
{if $GLOBAL.config.disable_contactform|default:"0" != 1}
|
||||
<li class="icon-mail"><a href="{$smarty.server.PHP_SELF}?page=contactform">Support</a></li>
|
||||
{else}
|
||||
<li class="icon-mail"><a href="{$smarty.server.PHP_SELF}?page=support">Support</a></li>
|
||||
{/if}
|
||||
<li class="icon-off"><a href="{$smarty.server.PHP_SELF}?page=logout">Logout</a></li>
|
||||
{else}
|
||||
<li class="icon-login"><a href="{$smarty.server.PHP_SELF}?page=login">Login</a></li>
|
||||
<li class="icon-pencil"><a href="{$smarty.server.PHP_SELF}?page=register">Sign Up</a></li>
|
||||
<li class="icon-mail"><a href="{$smarty.server.PHP_SELF}?page=support">Support</a></li>
|
||||
{if $GLOBAL.config.disable_contactform_guest|default:"0" == 1 || $GLOBAL.config.disable_contactform|default:"0" == 1}
|
||||
<li class="icon-mail"><a href="{$smarty.server.PHP_SELF}?page=support">Support</a></li>
|
||||
{else}
|
||||
<li class="icon-mail"><a href="{$smarty.server.PHP_SELF}?page=contactform">Support</a></li>
|
||||
{/if}
|
||||
<li class="icon-doc"><a href="{$smarty.server.PHP_SELF}?page=tac">Terms and Conditions</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user