Skip to content

Commit 51da743

Browse files
authored
Add privacy page
* Added a privacy page menu item
1 parent af92a98 commit 51da743

File tree

9 files changed

+153
-6
lines changed

9 files changed

+153
-6
lines changed

assets/css/admin.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,3 +1608,51 @@ ul.wpuf-form .wpuf-field-columns .wpuf-column-field-inner-columns .wpuf-column .
16081608
justify-content: space-between;
16091609
align-items: center;
16101610
}
1611+
1612+
/* Premium CTA */
1613+
.wpuf-premium-cta {
1614+
display: flex;
1615+
align-items: baseline;
1616+
font-size: 1.5em;
1617+
font-weight: 500;
1618+
flex-direction: column;
1619+
padding: 1em;
1620+
margin: 1em auto;
1621+
max-width: max-content;
1622+
box-shadow: 0px 1px 4px #8f8f8f;
1623+
border-radius: 0 2px 2px 0;
1624+
border-left: 5px solid #7ad376;
1625+
}
1626+
.wpuf-premium-cta img {
1627+
max-height: 30px;
1628+
}
1629+
.wpuf-premium-cta .button {
1630+
background-color: #7ad376;
1631+
color: #FFFFFF;
1632+
border-color: #7ad376;
1633+
}
1634+
.wpuf-premium-cta .button:hover {
1635+
background-color: #ffffff;
1636+
color: #7ad376;
1637+
border-color: #7ad376;
1638+
}
1639+
@media( min-width: 768px ) {
1640+
.wpuf-premium-cta * {
1641+
margin-right: 1em;
1642+
}
1643+
.wpuf-premium-cta {
1644+
flex-direction: row;
1645+
align-items: center;
1646+
margin: 1em 0;
1647+
}
1648+
}
1649+
1650+
/* Privacy Page */
1651+
.wpuf-privacy-page {
1652+
max-width: 1200px;
1653+
margin: 0 auto 0 0;
1654+
}
1655+
.wpuf-privacy-page p,
1656+
.wpuf-privacy-page li {
1657+
font-size: 1.2em;
1658+
}

assets/images/weforms-logo.png

1.84 KB
Loading

assets/js-templates/spa-components.php

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,18 @@
173173
<span style="color: #999;" class="form-name">
174174
{{ form_title }}
175175
</span>
176-
176+
177177
<select v-if="Object.keys(forms).length" v-model="selected" @change="status='publish'">
178178
<option :value="form.id" v-for="form in forms">{{ form.name }}</option>
179179
</select>
180180
</h1>
181+
<?php if ( ! class_exists( 'WeForms_Pro' ) ) {?>
182+
<div class="wpuf-premium-cta">
183+
<img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'images/weforms-logo.png'?>">
184+
<p><?php _e( 'You&#39;re using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?></p>
185+
<a href="https://weformspro.com/get-premium/?utm_source=Entries&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a>
186+
</div>
187+
<?php } ?>
181188
</div>
182189

183190
<div>
@@ -779,15 +786,28 @@
779786
<div class="contact-form-list">
780787
<h1 class="wp-heading-inline"><?php _e( 'All Forms', 'weforms' ); ?></h1>
781788
<a class="page-title-action add-form" herf="#" v-on:click.prevent="displayModal()"><?php _e( 'Add Form', 'weforms' ); ?></a>
782-
789+
<?php if ( ! class_exists( 'WeForms_Pro' ) ) {?>
790+
<div class="wpuf-premium-cta">
791+
<img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'images/weforms-logo.png'?>">
792+
<p><?php _e( 'You&#39;re using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?></p>
793+
<a href="https://weformspro.com/upgrade-now/?utm_source=All%20Forms&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a>
794+
</div>
795+
<?php } ?>
783796
<wpuf-template-modal :show.sync="showTemplateModal" :onClose="closeModal"></wpuf-template-modal>
784797

785798
<form-list-table></form-list-table>
786799
</div></script>
787800

788801
<script type="text/x-template" id="tmpl-wpuf-tools">
789802
<div class="export-import-wrap">
790-
803+
<h1><?php _e( 'Tools', 'weforms' ); ?></h1>
804+
<?php if ( ! class_exists( 'WeForms_Pro' ) ) {?>
805+
<div class="wpuf-premium-cta">
806+
<img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'images/weforms-logo.png'?>">
807+
<p><?php _e( 'You&#39;re using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?></p>
808+
<a href="https://weformspro.com/get-premium-weforms/?utm_source=Tools&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a>
809+
</div>
810+
<?php } ?>
791811
<h2 class="nav-tab-wrapper">
792812
<a :class="['nav-tab', isActiveTab( 'export' ) ? 'nav-tab-active' : '']" href="#" v-on:click.prevent="makeActive('export')"><?php _e( 'Export', 'wpuf' ); ?></a>
793813
<a :class="['nav-tab', isActiveTab( 'import' ) ? 'nav-tab-active' : '']" href="#" v-on:click.prevent="makeActive('import')"><?php _e( 'Import', 'wpuf' ); ?></a>
@@ -1063,6 +1083,36 @@
10631083
</div>
10641084
</script>
10651085

1086+
<script type="text/x-template" id="tmpl-wpuf-weforms-page-privacy">
1087+
<div class="wpuf-privacy-page">
1088+
1089+
<h1><?php _e('Privacy' , 'weforms'); ?></h1>
1090+
1091+
<h2><?php _e( 'Your website may need a Privacy Policy by law' , 'weforms' ); ?></h2>
1092+
1093+
<p><?php _e( 'We at weForms take privacy law compliance seriously, and we want our customers to know just how important it is for them as well.', 'weforms' ); ?></p>
1094+
1095+
<p><?php _e( 'Because you are implementing a contact form, that means you may be collecting the Personally Identifiable Information (PII) of individuals. This means that there may be privacy laws that apply to your website that require you to have a Privacy Policy. It is important to understand that if your website collects PII from users outside of your jurisdiction, you still may need to comply with the privacy laws of other states and countries. Please note that non-compliance may put you in danger of significant privacy related fines and lawsuits.' , 'weforms' ); ?></p>
1096+
1097+
<p><?php _e( 'If you do not have a Privacy Policy or are unsure if yours is up to date and compliant, we encourage you to generate one with our partner, Termageddon. Termageddon is a generator of Privacy Policies, Terms &amp; Conditions and more. They monitor privacy laws for you and update your Privacy Policy when new disclosures are required.' , 'weforms' ); ?></p>
1098+
1099+
<p><?php _e( 'If you decide Termageddon is a good solution for your website, use the promo code <strong>WEFORMS</strong> for 10&#37; off your first purchase at checkout. More information on Termageddon can be found <a href="https://app.termageddon.com/?fp_ref=weforms" target="_blank">here</a>.' , 'weforms' ); ?></p>
1100+
1101+
<p><?php _e( 'If you own a web design, web development or digital marketing company, check out <a href="https://termageddon.com/agency-partners/" target="_blank">Termageddon&#39;s agency partner program</a>, where you can offer Termageddon licenses to your clients, helping them stay compliant with privacy laws.' , 'weforms' ); ?></p>
1102+
1103+
<h2><?php _e( 'How to add Privacy Policy consent to your forms' , 'weforms' ); ?></h2>
1104+
1105+
<p><?php _e( 'Adding a Privacy Policy consent checkbox is your forms is simple. All you will need is the weForms plugin and an existing /privacy-policy page.' , 'weforms' ); ?></p>
1106+
1107+
<ol>
1108+
<li><?php _e( '"Edit" the respective form that you&#39;d like to add a consent checkbox to.' , 'weforms' ); ?></li>
1109+
<li><?php _e( 'Click &#39;checkbox&#39; so that it is added to the bottom of your form.' , 'weforms' ); ?></li>
1110+
<li><?php _e( '"Edit" the consent checkbox, remove the &#39;Field Label&#39;, and replace &#39;Option&#39; with &#39;INSERT YOUR "I AGREE" LANGUAGE HERE AND PROVIDE A LINK TO YOUR PRIVACY POLICY&#39;.' , 'weforms' ); ?></li>
1111+
</ol>
1112+
1113+
</div>
1114+
</script>
1115+
10661116
<script type="text/x-template" id="tmpl-wpuf-weforms-premium">
10671117
<div class="weforms-premium">
10681118
<?php
@@ -1092,7 +1142,7 @@
10921142
<p><?php _e( 'Upgrade to the premium versions of weForms and <br>unlock even more useful features.' ); ?></p>
10931143
</div>
10941144
<div class="banner-buttons">
1095-
<a href="https://weformspro.com/pricing" class="wf-btn wf-btn-primary" target="_blank"><?php _e( 'Buy Now', 'weforms' ); ?></a>
1145+
<a href="https://weformspro.com/premium/?utm_source=Premium%20Page&utm_medium=Top%20Button&utm_campaign=Buy%20Now" class="wf-btn wf-btn-primary" target="_blank"><?php _e( 'Buy Now', 'weforms' ); ?></a>
10961146
<a href="https://weformspro.com/docs/" class="wf-btn wf-btn-default" target="_blank"><?php _e( 'Read Full Guide', 'weforms' ); ?></a>
10971147
</div>
10981148
</div><!-- end banner left column -->
@@ -1318,7 +1368,7 @@
13181368
</div>
13191369
</div>
13201370
<div class="import-right">
1321-
<a href="https://weformspro.com/pricing" target="_blank" class="wf-btn wf-btn-primary wf-btn-lg"><?php _e( 'Upgrade Now', 'weforms' ); ?></a>
1371+
<a href="https://weformspro.com/upgrade/?utm_source=Premium%20Page&utm_medium=Bottom%20Button&utm_campaign=Upgrade%20Now" target="_blank" class="wf-btn wf-btn-primary wf-btn-lg"><?php _e( 'Upgrade Now', 'weforms' ); ?></a>
13221372
</div>
13231373
</div>
13241374
</section><!-- end footer section -->
@@ -1330,6 +1380,13 @@
13301380
<div class="weforms-settings clearfix" id="weforms-settings">
13311381

13321382
<h1><?php _e( 'Settings', 'weforms' ); ?></h1>
1383+
<?php if ( ! class_exists( 'WeForms_Pro' ) ) {?>
1384+
<div class="wpuf-premium-cta">
1385+
<img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) . 'images/weforms-logo.png'?>">
1386+
<p><?php _e( 'You&#39;re using weForms Free. For more features, modules and more consider upgrading to Pro.' , 'weforms' ); ?></p>
1387+
<a href="https://weformspro.com/premium-weforms/?utm_source=Settings&utm_medium=Button&utm_campaign=Upgrade%20Now" target="_blank" class="button"><?php _e( 'UPGRADE NOW!' , 'weforms' ); ?></a>
1388+
</div>
1389+
<?php } ?>
13331390
<div id="weforms-settings-tabs-warp" class="<?php echo !function_exists( 'weforms_pro' ) ? 'weforms-pro-deactivate' : ''; ?>">
13341391
<div id="weforms-settings-tabs">
13351392
<ul>

assets/js/spa-app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,12 @@ Generated: 2020-03-06 (1583433044699)
11861186
weForms.routeComponents.Help = {
11871187
template: '#tmpl-wpuf-weforms-page-help'
11881188
};
1189+
1190+
/* ./assets/spa/components/weforms-page-privacy/index.js */
1191+
weForms.routeComponents.Privacy = {
1192+
template: '#tmpl-wpuf-weforms-page-privacy'
1193+
};
1194+
11891195
/* ./assets/spa/components/weforms-premium/index.js */
11901196
weForms.routeComponents.Premium = {
11911197
template: '#tmpl-wpuf-weforms-premium',

assets/js/spa-app.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
weForms.routeComponents.Privacy = {
2+
template: '#tmpl-wpuf-weforms-page-privacy'
3+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="wpuf-privacy-page">
2+
3+
<h1><?php _e('Privacy' , 'weforms'); ?></h1>
4+
5+
<h2><?php _e( 'Your website may need a Privacy Policy by law' , 'weforms' ); ?></h2>
6+
7+
<p><?php _e( 'We at weForms take privacy law compliance seriously, and we want our customers to know just how important it is for them as well.', 'weforms' ); ?></p>
8+
9+
<p><?php _e( 'Because you are implementing a contact form, that means you may be collecting the Personally Identifiable Information (PII) of individuals. This means that there may be privacy laws that apply to your website that require you to have a Privacy Policy. It is important to understand that if your website collects PII from users outside of your jurisdiction, you still may need to comply with the privacy laws of other states and countries. Please note that non-compliance may put you in danger of significant privacy related fines and lawsuits.' , 'weforms' ); ?></p>
10+
11+
<p><?php _e( 'If you do not have a Privacy Policy or are unsure if yours is up to date and compliant, we encourage you to generate one with our partner, Termageddon. Termageddon is a generator of Privacy Policies, Terms &amp; Conditions and more. They monitor privacy laws for you and update your Privacy Policy when new disclosures are required.' , 'weforms' ); ?></p>
12+
13+
<p><?php _e( 'If you decide Termageddon is a good solution for your website, use the promo code <strong>WEFORMS</strong> for 10&#37; off your first purchase at checkout. More information on Termageddon can be found <a href="https://app.termageddon.com/?fp_ref=weforms" target="_blank">here</a>.' , 'weforms' ); ?></p>
14+
15+
<p><?php _e( 'If you own a web design, web development or digital marketing company, check out <a href="https://termageddon.com/agency-partners/" target="_blank">Termageddon&#39;s agency partner program</a>, where you can offer Termageddon licenses to your clients, helping them stay compliant with privacy laws.' , 'weforms' ); ?></p>
16+
17+
<h2><?php _e( 'How to add Privacy Policy consent to your forms' , 'weforms' ); ?></h2>
18+
19+
<p><?php _e( 'Adding a Privacy Policy consent checkbox is your forms is simple. All you will need is the weForms plugin and an existing /privacy-policy page.' , 'weforms' ); ?></p>
20+
21+
<ol>
22+
<li><?php _e( '"Edit" the respective form that you&#39;d like to add a consent checkbox to.' , 'weforms' ); ?></li>
23+
<li><?php _e( 'Click &#39;checkbox&#39; so that it is added to the bottom of your form.' , 'weforms' ); ?></li>
24+
<li><?php _e( '"Edit" the consent checkbox, remove the &#39;Field Label&#39;, and replace &#39;Option&#39; with &#39;INSERT YOUR "I AGREE" LANGUAGE HERE AND PROVIDE A LINK TO YOUR PRIVACY POLICY&#39;.' , 'weforms' ); ?></li>
25+
</ol>
26+
27+
</div>

includes/admin/class-admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public function register_admin_menu() {
9696
do_action( 'weforms-admin-menu', $hook, $capability );
9797

9898
$submenu['weforms'][] = [ __( '<span style="color:#f18500">Help</span>', 'weforms' ), $capability, 'admin.php?page=weforms#/help' ];
99+
$submenu['weforms'][] = [ __( 'Privacy', 'weforms' ), $capability, 'admin.php?page=weforms#/privacy' ];
99100
}
100101

101102
// only admins should see the settings page

includes/admin/class-form-builder-assets.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,11 @@ public function get_vue_routes() {
193193
'name' => 'help',
194194
'component' => 'Help',
195195
],
196+
[
197+
'path' => '/privacy',
198+
'name' => 'privacy',
199+
'component' => 'Privacy',
200+
],
196201
[
197202
'path' => '/premium',
198203
'name' => 'premium',

0 commit comments

Comments
 (0)