This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adjust contact form 7 radios and checkboxes to match bootstrap 4 custom radio structure. | |
*/ | |
add_filter('wpcf7_form_elements', function ($content) { | |
$content = preg_replace('/<label><input type="(checkbox|radio)" name="(.*?)" value="(.*?)" \/><span class="wpcf7-list-item-label">/i', '<label class="custom-control custom-\1"><input type="\1" name="\2" value="\3" class="custom-control-input"><span class="wpcf7-list-item-label custom-control-label">', $content); | |
return $content; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<input | |
:type="type" | |
:placeholder="placeholder" | |
:name="name" | |
class="form-control" | |
autocomplete="off" | |
v-model="value" | |
> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toTitleCase(str) { | |
return str.replace(/[\u00C0-\u1FFF\u2C00-\uD7FF\w]+\s*/g, function (txt) { | |
return txt.charAt(0).toUpperCase() + txt.substr(1); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel"> | |
<v-card> | |
<v-toolbar dark :color="options.color" dense flat> | |
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title> | |
</v-toolbar> | |
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text> | |
<v-card-actions class="pt-0"> | |
<v-spacer></v-spacer> | |
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn> |