Commit 481819aa authored by Bitcoin Please's avatar Bitcoin Please
Browse files

Cleanup campaign manager.

parent 6dc66c46
......@@ -151,23 +151,6 @@
<input type="text" value="" id="fundinggoal">
</div>
<div class="field">
<label for="tag">Tags *</label>
<span class="label-desc">Enter up to five keywords that best describe your campaign.</span>
<input type="text" id="tag" value="" name="title" placeholder="Enter a few tags for your campaign" />
</div>
<div class="reminder">
<h4>Project Collaborators</h4>
<p>
Grant your teammates access to help with your project.
</p>
<a href="javascript://" class="btn-primary">Add collaborators</a>
</div>
<input type="submit" class="btn-primary" value="Save & Continue">
</form>
</div>
</section>
......
......@@ -405,14 +405,8 @@ export default {
/* Set campaign id. */
const campaignId = this.campaign.id
/* Set description. */
const summary = this.summary
/* Set description. */
const description = this.quillDesc.getText()
/* Set images. */
const images = {
/* Set media. */
const media = {
main: this.photo1Url || null,
cover: this.photo1Url || null,
gallery: [
......@@ -421,31 +415,20 @@ export default {
]
}
const pkg = {
const campaign = {
campaignId,
summary,
description,
images,
media,
}
console.log('PACKAGE', pkg)
const signedPkg = this.getSignedMessage(JSON.stringify(pkg))
console.log('SIGNED PACKAGE', signedPkg)
console.log('PACKAGE', campaign)
// this.updateCampaign
/* Request update. */
const result = await this.updateCampaign(campaign)
console.log('WRITE UPDATE (result):')
/* Set api target. */
// const target = 'https://api.causes.cash/v1/campaigns'
// const target = 'http://localhost:6767/v1/campaigns'
// const result = await superagent
// .put(target)
// .send(signedPkg)
// console.log('RESULT', result)
// if (result.ok && !result.error) {
// alert('Campaign updated successfully!')
// }
/* Handle result. */
if (result.ok && !result.error) {
alert('Campaign updated successfully!')
}
},
},
......
......@@ -12,6 +12,18 @@
<input type="email" id="contactemail">
</div>
<div class="reminder">
<h4>Project Collaborators</h4>
<p>
Grant your teammates access to help with your project.
</p>
<a href="javascript://" class="btn-primary">Add collaborators</a>
</div>
<input type="submit" class="btn-primary" value="Save & Continue">
<div class="field">
<label for="individual">Funds recipient</label>
......
......@@ -3,7 +3,7 @@
<section class="campaign-form form-update">
<div class="start-form">
<form action="javascript://">
<h1>Content Creation</h1>
<h1>Content Editor</h1>
<hr />
<div class="field">
......@@ -34,8 +34,6 @@
<div id="desc-editor" class="editor"></div>
</div>
<hr />
<!-- Risks & Challenges -->
<div class="field">
<label>Project guide</label>
......@@ -47,6 +45,16 @@
<div id="guide-editor" class="editor"></div>
</div>
<div class="field">
<label for="tag">Tags</label>
<span class="label-desc">
Enter up to five keywords that best describe your campaign.
</span>
<input type="text" id="tags" v-model="tags" placeholder="Enter a few tags for your campaign" />
</div>
<input
type="submit"
class="btn-primary"
......@@ -77,6 +85,7 @@ export default {
campaignId: null,
summary: null,
tags: null,
quillDesc: null,
quillGuide: null,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment