Add optional self-hosted ALTCHA protection and dependency maintenance
This commit is contained in:
1 parent
3b558409f3
commit
2a2f1d5878
59 files changed
+2648
-12
No files matched your search
+4
-1
@@ -62,9 +62,12 @@ function hgcf_render($atts=[]) {
|
||||
<div class="form-fields"><?php if($has('date')): ?><label for="mlhc-date" data-hgcf-field="date"><span data-hgcf-label><?php echo esc_html($t('Voorkeursdatum','Preferred date')); ?></span><input id="mlhc-date" name="mlhc_preferred_date" type="date" min="<?php echo esc_attr(wp_date('Y-m-d')); ?>" value="<?php echo esc_attr($value('preferred_date')); ?>"></label><?php endif; ?><?php if($has('time')): ?><label for="mlhc-time" data-hgcf-field="time"><span data-hgcf-label><?php echo esc_html($t('Voorkeurstijd','Preferred time')); ?></span><input id="mlhc-time" name="mlhc_preferred_time" type="time" min="<?php echo esc_attr($flow['opening_time']); ?>" max="<?php echo esc_attr($flow['closing_time']); ?>" value="<?php echo esc_attr($value('preferred_time')); ?>"></label><?php endif; ?></div>
|
||||
</fieldset><?php endif; ?><p class="form-note workflow-hint"><?php echo esc_html(hgcf_translated($flow['hint'],$lang)); ?></p>
|
||||
<label for="mlhc-message"><span class="message-label"><?php echo esc_html(hgcf_translated($flow['message_label'],$lang)); ?></span><textarea id="mlhc-message" name="mlhc_message" rows="5" maxlength="5000"><?php echo esc_textarea($value('message')); ?></textarea></label>
|
||||
<label class="consent"><input type="checkbox" name="mlhc_consent" value="1" required <?php checked($value('consent'),'1'); ?>><span><?php echo esc_html(hgcf_local_setting('consent',$lang)); ?></span></label><p class="form-note"><?php echo esc_html(hgcf_local_setting('note',$lang)); ?></p><button type="submit" class="button"><?php echo esc_html($t('Verstuur bericht','Send message')); ?></button>
|
||||
<label class="consent"><input type="checkbox" name="mlhc_consent" value="1" required <?php checked($value('consent'),'1'); ?>><span><?php echo esc_html(hgcf_local_setting('consent',$lang)); ?></span></label><p class="form-note"><?php echo esc_html(hgcf_local_setting('note',$lang)); ?></p>
|
||||
<?php if(hgcf_altcha_enabled()): ?><div class="hgcf-antispam"><altcha-widget name="mlhc_altcha" challenge="<?php echo esc_url(add_query_arg('page',get_queried_object_id(),rest_url('hg-contactform/v1/challenge'))); ?>" language="<?php echo esc_attr(substr($lang,0,2)); ?>" auto="onfocus" workers="2"></altcha-widget><noscript><p class="form-note"><?php echo esc_html($t('Schakel JavaScript in voor de antispamcontrole of gebruik een andere contactmogelijkheid.','Enable JavaScript for the spam protection check or use another contact option.')); ?></p></noscript></div><?php endif; ?>
|
||||
<button type="submit" class="button"><?php echo esc_html($t('Verstuur bericht','Send message')); ?></button>
|
||||
</form></section>
|
||||
<?php
|
||||
if(hgcf_altcha_enabled())wp_enqueue_script('hgcf-altcha',plugins_url('assets/vendor/altcha/widget.js',HGCF_FILE),[],HGCF_VERSION,true);
|
||||
wp_enqueue_style('hgcf',plugins_url('assets/contact.css',HGCF_FILE),[],HGCF_VERSION);wp_enqueue_script('hgcf',plugins_url('assets/contact.js',HGCF_FILE),[],HGCF_VERSION,true);
|
||||
return ob_get_clean();
|
||||
}
|
||||
Reference in new issue
Block a user