Skip to content

Commit 2d7fbd0

Browse files
allow admin to opt out of CLR (gitcoinco#8607)
* allow admin to opt out of CLR * add feedback comments
1 parent 5a25838 commit 2d7fbd0

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

app/assets/v2/js/grants/_detail-component.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Vue.mixin({
6868
'team_members[]': JSON.stringify(vm.teamFormatted),
6969
'handle1': vm.grant.twitter_handle_1,
7070
'handle2': vm.grant.twitter_handle_2,
71+
'is_clr_eligible': vm.grant.is_clr_eligible,
7172
'eth_payout_address': vm.grant.admin_address,
7273
'zcash_payout_address': vm.grant.zcash_payout_address,
7374
'celo_payout_address': vm.grant.celo_payout_address,

app/grants/templates/grants/detail/template-grant-details.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,16 @@ <h5 class="font-weight-bold mb-3">Verify Grant Ownership with Twitter</h5>
493493
</v-select>
494494
</div>
495495

496+
<!-- Is CLR Eligible -->
497+
<div class="col-12 mb-3">
498+
<b-form-checkbox v-model="grant.is_clr_eligible" name="is_clr_eligible">
499+
<label class="font-caption letter-spacing text-black-60 text-uppercase">OPT IN FOR CLR</label>
500+
<span class="font-smaller-6 text-black-60 text-capitalize ml-2">
501+
(If unchecked, your grant will not be able part of the CLR rounds on Gitcoin)
502+
</span>
503+
</b-form-checkbox>
504+
</div>
505+
496506
<!-- Save/Cancel -->
497507
<div class="col-12 mb-3 text-right">
498508
<button @click="saveGrant($event)" class="btn btn-primary">SAVE CHANGES</button>

app/grants/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,10 @@ def grant_edit(request, grant_id):
15951595
if not description_rich:
15961596
description_rich = description
15971597

1598+
if grant.active:
1599+
is_clr_eligible = json.loads(request.POST.get('is_clr_eligible', 'true'))
1600+
grant.is_clr_eligible = is_clr_eligible
1601+
15981602
eth_payout_address = request.POST.get('eth_payout_address', '0x0')
15991603
zcash_payout_address = request.POST.get('zcash_payout_address', '0x0')
16001604
celo_payout_address = request.POST.get('celo_payout_address', '0x0')

0 commit comments

Comments
 (0)