Skip to content

Commit

Permalink
qa fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Nov 30, 2018
1 parent 96fd50f commit e8cb03a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/assets/v2/css/grants/grant.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@
}

.alpha-warning {
background-color: #fbe0d6;
color: #fb9470;
background-color: #fb9470;
color: #fbe0d6;
padding: 5px 10px;
border-radius: 2px;
margin-bottom: 15px;
Expand Down
8 changes: 4 additions & 4 deletions app/grants/templates/grants/fund.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h2 class="font-title-lg my-4">{% trans "Fund Grant" %}</h2>
<label class="form__label">{% trans "Payment Period" %}</label>
<div class="row">
<div class="col-8">
<input type="number" id="frequency_count" name="frequency" class="form__input" value='30' required />
<input type="number" min=0 step="1" id="frequency_count" name="frequency" class="form__input" value='30' required />
</div>
<div class="col-4 font-body">
<select name="frequency_unit" id="frequency_unit" class="js-select2" style="width: 100%">
Expand All @@ -88,7 +88,7 @@ <h2 class="font-title-lg my-4">{% trans "Fund Grant" %}</h2>
<label class="form__label">{% trans "Amount Per Period" %}</label>
<div class="row">
<div class="col-8">
<input type="number" id="amount" name="amount_per_period" class="form__input" required />
<input type="number" min=1 id="amount" name="amount_per_period" class="form__input" required />
</div>
<div class="col-4">
{% if grant_has_no_token %}
Expand All @@ -106,9 +106,9 @@ <h2 class="font-title-lg my-4">{% trans "Fund Grant" %}</h2>
<div class="row">
<div class="col-12">
<label class="form__label">
{% trans "Number Of Periods" %}
{% trans "Number Of Recurring Payments" %}
</label>
<input id="period" type="number" name="approve" class="form__input" required />
<input id="period" type="number" min=0 step="1" name="approve" class="form__input" required />
</div>
</div>
</div>
Expand Down
12 changes: 3 additions & 9 deletions app/grants/templates/grants/shared/alpha.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load static humanize i18n %}

<div class="alpha-warning font-caption mb-0">
<div>
{% trans "WARNING: Gitcoin Grants is in" %}
<span class="font-weight-bold">ALPHA</span>
{% trans "release." %}
</div>
<div>
{% trans "It has had inital audits done on it's smart contract and we are in the process of testing it holistically. Please, use caution and do not send high amounts of value." %}
</div>
{% trans "WARNING: Gitcoin Grants is in" %}
<span class="font-weight-bold">ALPHA</span>
{% trans "release. Please use caution if funding at high values." %}
</div>
9 changes: 9 additions & 0 deletions app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,15 @@ def grant_fund(request, grant_id, grant_slug):
}
return TemplateResponse(request, 'grants/shared/error.html', params)

if grant.admin_profile == profile:
params = {
'active': 'grant_error',
'title': _('Invalid Grant Subscription'),
'grant': grant,
'text': _('You cannot fund your own Grant.')
}
return TemplateResponse(request, 'grants/shared/error.html', params)

active_subscription = Subscription.objects.select_related('grant').filter(
grant=grant_id, active=True, contributor_profile=request.user.profile
)
Expand Down

0 comments on commit e8cb03a

Please sign in to comment.