Closes #165 Fix layout for security question and reCAPTCHAs

This commit is contained in:
Mike Koch 2015-03-09 21:58:27 -04:00
parent 7ea2323e3d
commit f93620b09e

View File

@ -879,7 +879,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
{ {
?> ?>
<div class="form-group"> <div class="form-group">
<label for="question"><?php echo $hesklang['verify_q']; ?> <font class="important">*</font></label> <label for="question" class="col-sm-3 control-label"><?php echo $hesklang['verify_q']; ?> <span class="important">*</span></label>
<?php <?php
$value = ''; $value = '';
@ -888,7 +888,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
$value = stripslashes(hesk_input($_SESSION['c_question'])); $value = stripslashes(hesk_input($_SESSION['c_question']));
} }
$cls = in_array('question',$_SESSION['iserror']) ? ' class="isError" ' : ''; $cls = in_array('question',$_SESSION['iserror']) ? ' class="isError" ' : '';
echo $hesk_settings['question_ask'].'<br /><input class="form-control" id="question" type="text" name="question" size="20" value="'.$value.'" '.$cls.' />'; echo '<div class="col-md-9">'.$hesk_settings['question_ask'].'<br /><input class="form-control" id="question" type="text" name="question" size="20" value="'.$value.'" '.$cls.' /></div>';
?> ?>
</div> </div>
<?php <?php
@ -927,15 +927,21 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
} }
}; };
</script> </script>
<div class="col-md-9">
<?php <?php
require(HESK_PATH . 'inc/recaptcha/recaptchalib.php'); require(HESK_PATH . 'inc/recaptcha/recaptchalib.php');
echo recaptcha_get_html($hesk_settings['recaptcha_public_key'], null, true); echo recaptcha_get_html($hesk_settings['recaptcha_public_key'], null, true);
?>
</div>
<?php
} }
// Use reCaptcha API v2? // Use reCaptcha API v2?
elseif ($hesk_settings['recaptcha_use'] == 2) elseif ($hesk_settings['recaptcha_use'] == 2)
{ {
?> ?>
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div> <div class="col-md-9">
<div class="g-recaptcha" data-sitekey="<?php echo $hesk_settings['recaptcha_public_key']; ?>"></div>
</div>
<?php <?php
} }
// At least use some basic PHP generated image (better than nothing) // At least use some basic PHP generated image (better than nothing)