Skip to content

Commit

Permalink
flycricket terms integration (#91)
Browse files Browse the repository at this point in the history
* flycricket terms integration

* form tag rename

* flycricket pug card removed - form kept

* onsubmit removal

* flycricket buttons flagged
  • Loading branch information
cjbeauchamp authored Dec 16, 2020
1 parent 3c22b71 commit 3d42c34
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
16 changes: 11 additions & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ <h4 class="subtitle">
<div id="fc-callouts">
<form id="fc-form" action="https://app.flycricket.com/import/privacy" method="post" target="_blank" onsubmit="return fc_submit(event)">
<input type="hidden" name="fc-referrer" value="nishant">
<input id="fc-terms" type="hidden" name="fc-terms">
<input id="fc-body" type="hidden" name="fc-body">
<input id="fc-name" type="hidden" name="fc-name" v-model="appName">
<div style="margin-top: 1em;">
<button class="button is-light is-small">Learn More</button>
<button class="button is-black is-small">Deploy</button>
</div>
</form>
<div class="fc-powered-by">Powered by <a href="https://app.flycricket.com/r/nishant?utm_source=partner&amp;utm_medium=website&amp;utm_campaign=privacy_generator" target="_blank" rel="noopener noreferrer">Flycricket</a></div>
<div style="margin-top: 1em;">
<button class="button is-black is-small" @click="fc_deploy()">Deploy</button>
</div>
<div class="fc-powered-by" style="margin-top:0.25em;">Powered by <a href="https://app.flycricket.com/r/nishant?utm_source=partner&amp;utm_medium=website&amp;utm_campaign=privacy_generator" target="_blank" rel="noopener noreferrer">Flycricket</a></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -345,6 +345,9 @@ <h4 class="subtitle">
<button class="button is-success" @click="getHtml('privacy_content','privacy_txtarea')">HTML</button>
<button class="button is-success" @click="getMarkdown('privacy_content', 'privacy_txtarea')">Markdown</button>
<button class="button is-success" v-if="contentRenderType!=1" @click="preview()">Preview</button>
<div style="flex:1">
<button class="button is-info" @click="fc_deploy()" style="float:right;">Deploy</button>
</div>
</footer>
</div>
</div>
Expand Down Expand Up @@ -488,6 +491,9 @@ <h4 class="subtitle">
<button class="button is-success" @click="getHtml('tandc_content','tandc_txtarea')">HTML</button>
<button class="button is-success" @click="getMarkdown('tandc_content', 'tandc_txtarea')">Markdown</button>
<button class="button is-success" v-if="contentRenderType!=1" @click="preview()">Preview</button>
<div style="flex:1">
<button class="button is-info" @click="fc_deploy()" style="float:right;">Deploy</button>
</div>
</footer>
</div>
</div>
Expand Down
11 changes: 7 additions & 4 deletions public/js/flycricket.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function fc_submit (e) {
function fc_deploy() {
var form = document.getElementById("fc-form");

// fill in the body with the html content
document.getElementById('fc-body').value = getContent('privacy_content')

return true
}
document.getElementById('fc-terms').value = getContent('tandc_content')

form.submit();
}
5 changes: 5 additions & 0 deletions src/includes/content/privacy_policy/simple.pug
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@
| Markdown
button.button.is-success(v-if='contentRenderType!=1' @click='preview()')
| Preview
//- Flycricket
if (flycricket)
div(style='flex:1')
button.button.is-info(@click="fc_deploy()" style='float:right;')
| Deploy
6 changes: 6 additions & 0 deletions src/includes/content/tnc/simple.pug
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@
| Markdown
button.button.is-success(v-if='contentRenderType!=1' @click='preview()')
| Preview
//- Flycricket
if (flycricket)
div(style='flex:1')
button.button.is-info(@click="fc_deploy()" style='float:right;')
| Deploy

21 changes: 5 additions & 16 deletions src/includes/content/wizard/affliate/flycricket.pug
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
#fc-container.box
#fc-container-text
.fc-title Free privacy policy hosting + website for {{ appName }}.
#fc-callouts
form#fc-form(action='https://app.flycricket.com/import/privacy' method='post' target='_blank' onsubmit='return fc_submit(event)')
input(type='hidden' name='fc-referrer' value='nishant')
input#fc-body(type='hidden' name='fc-body')
input#fc-name(type='hidden' name='fc-name' v-model='appName')
div(style='margin-top: 1em;')
button.button.is-light.is-small
| Learn More
button.button.is-black.is-small
| Deploy
.fc-powered-by
| Powered by
a(href='https://app.flycricket.com/r/nishant?utm_source=partner&utm_medium=website&utm_campaign=privacy_generator' target='_blank' rel='noopener noreferrer') Flycricket
form#fc-form(action='https://app.flycricket.com/import/privacy' method='post' target='_blank')
input(type='hidden' name='fc-referrer' value='nishant')
input#fc-terms(type='hidden' name='fc-terms')
input#fc-body(type='hidden' name='fc-privacy')
input#fc-name(type='hidden' name='fc-name' v-model='appName')

0 comments on commit 3d42c34

Please sign in to comment.