Skip to content

Commit

Permalink
allow admin to opt out of CLR (#8607)
Browse files Browse the repository at this point in the history
* allow admin to opt out of CLR

* add feedback comments
  • Loading branch information
thelostone-mc authored Mar 17, 2021
1 parent 5a25838 commit 2d7fbd0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/assets/v2/js/grants/_detail-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Vue.mixin({
'team_members[]': JSON.stringify(vm.teamFormatted),
'handle1': vm.grant.twitter_handle_1,
'handle2': vm.grant.twitter_handle_2,
'is_clr_eligible': vm.grant.is_clr_eligible,
'eth_payout_address': vm.grant.admin_address,
'zcash_payout_address': vm.grant.zcash_payout_address,
'celo_payout_address': vm.grant.celo_payout_address,
Expand Down
10 changes: 10 additions & 0 deletions app/grants/templates/grants/detail/template-grant-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,16 @@ <h5 class="font-weight-bold mb-3">Verify Grant Ownership with Twitter</h5>
</v-select>
</div>

<!-- Is CLR Eligible -->
<div class="col-12 mb-3">
<b-form-checkbox v-model="grant.is_clr_eligible" name="is_clr_eligible">
<label class="font-caption letter-spacing text-black-60 text-uppercase">OPT IN FOR CLR</label>
<span class="font-smaller-6 text-black-60 text-capitalize ml-2">
(If unchecked, your grant will not be able part of the CLR rounds on Gitcoin)
</span>
</b-form-checkbox>
</div>

<!-- Save/Cancel -->
<div class="col-12 mb-3 text-right">
<button @click="saveGrant($event)" class="btn btn-primary">SAVE CHANGES</button>
Expand Down
4 changes: 4 additions & 0 deletions app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,10 @@ def grant_edit(request, grant_id):
if not description_rich:
description_rich = description

if grant.active:
is_clr_eligible = json.loads(request.POST.get('is_clr_eligible', 'true'))
grant.is_clr_eligible = is_clr_eligible

eth_payout_address = request.POST.get('eth_payout_address', '0x0')
zcash_payout_address = request.POST.get('zcash_payout_address', '0x0')
celo_payout_address = request.POST.get('celo_payout_address', '0x0')
Expand Down

0 comments on commit 2d7fbd0

Please sign in to comment.