-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5343 from thelostone-mc/buz
increase_bounty: add coupon code
- Loading branch information
Showing
6 changed files
with
130 additions
and
110 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,21 +22,16 @@ | |
<head> | ||
{% include 'shared/head.html' %} | ||
{% include 'shared/cards.html' %} | ||
<style> | ||
#primary_form { | ||
max-width: 40rem; | ||
} | ||
</style> | ||
<link rel="stylesheet" href={% static "v2/css/submit_bounty.css" %}> | ||
</head> | ||
|
||
<body class="interior {{active}} g-font-muli"> | ||
<body class="interior {{active}} g-font-muli" style="background-color: #FFFFFF;"> | ||
{% include 'shared/tag_manager_2.html' %} | ||
<div class="container-fluid header dash"> | ||
{% include 'shared/top_nav.html' with class='d-md-flex' %} | ||
{% include 'shared/nav.html' %} | ||
</div> | ||
<div class="container-fluid"> | ||
<div class="container-fluid submit_bounty_content"> | ||
<div class="row no-gutters metamask-banner"> | ||
<div class="col-12"> | ||
{% include 'shared/no_issue_error.html' with page='submit_bounty' %} | ||
|
@@ -48,110 +43,120 @@ | |
</div> | ||
{% include 'shared/success_container.html' %} | ||
<div class="row content"> | ||
<div class="col-12 body"> | ||
<div class="col-12"> | ||
<div class="row font-smaller-2" id="form_container"> | ||
<div id="robot_error" class="hidden"> | ||
<img src="{% static "v2/images/prime.png" %}"> | ||
</div> | ||
<input type="hidden" name="standardBountiesId" | ||
value="{{bounty.standard_bounties_id}}"> | ||
<input type="hidden" name="bountyOwnerAddress" | ||
value="{{bounty.bounty_owner_address}}"> | ||
<input type="hidden" name="valueInToken" | ||
value="{{bounty.value_in_token}}"> | ||
<div class="col offset-md-1 col-md-10 d-flex align-items-center justify-content-center" id="primary_form"> | ||
<div class="d-flex justify-content-center flex-column mt-5" id="primary_subform"> | ||
<div class="w-100 text-center"> | ||
<h3>Increase Funding</h3> | ||
<img src="{% static "v2/images/prime.png" %}"> | ||
</div> | ||
{% include 'shared/bounty_actions_hidden_vars.html' %} | ||
{% include 'shared/network_status.html' %} | ||
<div class="w-100"> | ||
<label class="form__label" for=issueURL>Issue URL</label> | ||
<input name='issueURL' id="issueURL" class="w-100 form__input" type="url" placeholder="https://github.com/user/repo/issues/n" value="{% if bounty %}{{bounty.github_url}}{%endif%}" disabled/> | ||
</div> | ||
<div class="w-100 mt-2"> | ||
<label class="form__label" for="amount">Amount</label> | ||
<div class="form__flex-group"> | ||
<div class="form__amount-wrapper"> | ||
<input name='amount' id='amount' value='0.01' min="0.01" step="0.0001" class="form__input" type="number" placeholder="Amount" /> | ||
</div> | ||
<div class="form__group-item font-body"> | ||
<div class="form__select2"> | ||
<select name='denomination' id='token' data-token-address='{{bounty.token_address}}' disabled></select> | ||
</div> | ||
</div> | ||
|
||
<input type="hidden" name="standardBountiesId" value="{{bounty.standard_bounties_id}}"> | ||
<input type="hidden" name="bountyOwnerAddress" value="{{bounty.bounty_owner_address}}"> | ||
<input type="hidden" name="valueInToken" value="{{bounty.value_in_token}}"> | ||
|
||
<div class="col-lg-7 col-sm-12 my-5 pt-5" id="primary_form"> | ||
<div id="primary_subform"> | ||
<div class="bg-white rounded p-5"> | ||
<h1 class="text-center title">{% trans "Increase Bounty" %}</h1> | ||
<p class="text-center font-bigger-1 text-black-60">Contribute funds to increase the reward for this bounty!</p> | ||
|
||
{% include 'shared/bounty_actions_hidden_vars.html' %} | ||
<div class="mt-4"> | ||
<label class="form__label mb-0" for=issueURL>Issue URL</label> | ||
<p class="font-subheader">{{ bounty.title }}</p> | ||
</div> | ||
<small class="form__input-help form__input-help--dynamic" id="usd_amount"></small> | ||
</div> | ||
<div id="gas-section" class="mt-2"> | ||
{% include 'shared/wallet_estimate.html' %} | ||
</div> | ||
{% if FEE_PERCENTAGE != 0 %} | ||
<div id="fee-section" class="mt-4"> | ||
<h5 class="font-subheader">{% trans "No Surprises" %}</h5> | ||
<div class="row"> | ||
<div class="col-12 col-sm-9 mt-3 font-body"> | ||
<p> | ||
{% blocktrans %} | ||
Simply pay the bounty amount ( plus a standard | ||
<span class="fee-percentage font-weight-bold">10</span><span class="font-weight-bold">%</span> Gitcoin platform fee ). | ||
This covers our costs for finding quality contributors to join our platform so that you get the best work. | ||
If your business requires additional assistance, please contact us <a href="mailto:[email protected]">[email protected]</a> | ||
{% endblocktrans %} | ||
</p> | ||
<div> | ||
<label class="form__label mb-0" for=issueURL>Issue URL</label> | ||
<p class="font-subheader" id="issueURL">{{ bounty.github_url }}</p> | ||
</div> | ||
<div class="mt-2"> | ||
<div class="form__flex-group"> | ||
<div class="form__amount-wrapper"> | ||
<label class="form__label" for="amount">Amount</label> | ||
<input name='amount' id='amount' value='0.01' min="0.01" step="0.0001" class="form__input" type="number" placeholder="Amount" /> | ||
</div> | ||
<div class="col-12 col-sm-3 order-first order-sm-last mt-4 mt-sm-2 mt-md-0 mb-4 mb-sm-3"> | ||
<div class="fee-circle text-center"> | ||
<p class="font-title mb-0"><span id="fee-amount">0</span> <span id="fee-token">{{ bounty.token_name }}</span></p> | ||
<p class="font-body font-weight-semibold"> | ||
(<span class="fee-percentage">10</span>%) | ||
</p> | ||
<div class="form__group-item font-body"> | ||
<label class="form__label" for="token">Token</label> | ||
<div class="form__select2"> | ||
<select name='denomination' id='token' data-token-address='{{bounty.token_address}}' disabled></select> | ||
</div> | ||
</div> | ||
</div> | ||
<small class="form__input-help form__input-help--dynamic" id="usd_amount"></small> | ||
</div> | ||
{% endif %} | ||
<div id="total-section" class="row mt-3 py-3"> | ||
<div class="col-sm-2 my-auto"> | ||
<h5 class="font-title-lg mb-0">{% trans "Total"%} </h5> | ||
<div id="gas-section" class="py-4"> | ||
{% include 'shared/wallet_estimate.html' %} | ||
</div> | ||
<div class="col-sm-10 text-sm-right my-auto"> | ||
<p class="mb-1">{% trans "Payment Due = " %} <span id="summary-total-amount" class="font-weight-bold"></span></p> | ||
|
||
<p class="font-caption mb-1"> | ||
( Increased Bounty <span id="summary-bounty-amount" class="font-weight-bold">0</span> | ||
<span id="summary-bounty-token" class="font-weight-bold">{{ bounty.token_name }}</span> + | ||
|
||
{% if FEE_PERCENTAGE == 0 %} | ||
<span class="font-weight-bold">NO</span> | ||
{% else %} | ||
<span id="summary-fee-amount" class="font-weight-bold">0</span> | ||
<span id="summary-fee-token" class="font-weight-bold">{{ bounty.token_name }}</span> | ||
{% endif %} | ||
Gitcoin Platform Fee ) | ||
</p> | ||
<p class="font-caption mb-0"> | ||
You will have to approve | ||
<span id="confirmation" class="font-weight-bold"> | ||
{% if FEE_PERCENTAGE == 0 %} 1 Metamask confirmation. {% else %} 2 Metamask confirmations.{% endif %} | ||
</span> | ||
</p> | ||
{% if FEE_PERCENTAGE != 0 %} | ||
<div id="fee-section" class="mt-4"> | ||
<h5 class="font-subheader">{% trans "No Surprises" %}</h5> | ||
<div class="row"> | ||
<div class="col-12 col-sm-9 mt-3 font-body"> | ||
<p> | ||
{% blocktrans %} | ||
Simply pay the bounty amount ( plus a standard | ||
<span class="fee-percentage font-weight-bold">10</span><span class="font-weight-bold">%</span> Gitcoin platform fee ). | ||
This covers our costs for finding quality contributors to join our platform so that you get the best work. | ||
If your business requires additional assistance, please contact us <a href="mailto:[email protected]">[email protected]</a> | ||
{% endblocktrans %} | ||
</p> | ||
</div> | ||
<div class="col-12 col-sm-3 order-first order-sm-last mt-4 mt-sm-2 mt-md-0 mb-4 mb-sm-3"> | ||
<div class="fee-circle text-center"> | ||
<p class="font-title mb-0"><span id="fee-amount">0</span> <span id="fee-token">{{ bounty.token_name }}</span></p> | ||
<p class="font-body font-weight-semibold"> | ||
(<span class="fee-percentage">10</span>%) | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="w-100 terms_container mb-3" style="padding-top:5px;"> | ||
<div class="form__checkbox"> | ||
<input name='terms' id='terms' type="checkbox" value=1 required /> | ||
<label class="form__label" for=terms>I have read, understand, and agree to, the <a href="{% url "terms" %}" target=new>Terms of Service</a>.</label> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="w-100 terms_container mb-3" style="padding-top:5px;"> | ||
<div class="form__checkbox"> | ||
<input name='terms' id='terms' type="checkbox" value=1 required /> | ||
<label class="form__label" for=terms>I have read, understand, and agree to, the <a href="{% url "terms" %}" target=new>Terms of Service</a>.</label> | ||
|
||
<div class="bg-white my-3 px-5 rounded"> | ||
<div id="total-section" class="row mt-3 py-3"> | ||
<div class="col-sm-2 my-auto"> | ||
<h5 class="text-uppercase h3 font-weight-bold mb-0">{% trans "Total"%}</h5> | ||
</div> | ||
<div class="col-sm-10 my-auto"> | ||
<p class="mb-1 text-uppercase text-black-50 font-body">{% trans "Payment Due" %}</p> | ||
<span id="summary-total-amount" class="h2 text-darkblue font-weight-bold my-3 d-block"></span> | ||
<p class="font-caption text-black-50 mb-1"> | ||
( Increased Bounty Amount <span id="summary-bounty-amount" class="font-weight-bold">0</span> | ||
<span id="summary-bounty-token" class="font-weight-bold">{{ bounty.token_name }}</span> + | ||
|
||
{% if FEE_PERCENTAGE == 0 %} | ||
+ <span class="font-weight-bold">No Fees</span> | ||
{% else %} | ||
+ | ||
<span id="summary-fee-amount" class="font-weight-bold">0</span> | ||
<span id="summary-fee-token" class="font-weight-bold">{{ bounty.token_name }}</span> | ||
{% endif %} | ||
Gitcoin Platform Fee ) | ||
</p> | ||
<p class="font-caption mb-0"> | ||
You will have to approve | ||
<span id="confirmation" class="font-weight-bold"> | ||
{% if FEE_PERCENTAGE == 0 %} 1 Metamask confirmation. {% else %} 2 Metamask confirmations.{% endif %} | ||
</span> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
<button class="button button--primary w-100" type="submit" id="increaseFunding">Increase Funding</button> | ||
<div class="mt-3 text-center"> | ||
<a id="increase_funding_explainer" class="font-caption text-center" target="_blank" rel="noopener noreferrer" href="https://github.com/gitcoinco/web#high-level-flows"> | ||
Your transaction is secured by the audited StandardBounties contract on the Ethereum blockchain. </br> | ||
Learn more here. | ||
</a> | ||
|
||
<div class="pb-5 text-center"> | ||
<button class="font-subheader btn btn-gc-blue btn-lg mb-3 w-25 btn-lg-padding" type="submit" id="increaseFunding">Increase Funding</button> | ||
<p class="font-caption blue"> | ||
Your transaction is secured by the audited StandardBounties contract on the Ethereum blockchain. | ||
<a class="text-reset underline" target="_blank" rel="noopener noreferrer" href="https://github.com/gitcoinco/web#high-level-flows">Learn more here.</a> | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -171,6 +176,9 @@ <h5 class="font-title-lg mb-0">{% trans "Total"%} </h5> | |
<script> | ||
document.is_funder_github_user_same = {{ is_funder }}; | ||
document.FEE_PERCENTAGE = {{ FEE_PERCENTAGE }}; | ||
{% if expired_coupon %} | ||
_alert({ message: 'This coupon has expired.' }, 'error'); | ||
{% endif %} | ||
</script> | ||
|
||
<script src="{% static "v2/js/pages/wallet_estimate.js" %}"></script> | ||
|
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
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