Skip to content

Commit

Permalink
Merge pull request #2828 from thelostone-mc/grants-fix
Browse files Browse the repository at this point in the history
qa : fixes
  • Loading branch information
thelostone-mc authored Nov 15, 2018
2 parents bc34beb + 5a8bb90 commit 5fce377
Show file tree
Hide file tree
Showing 20 changed files with 304 additions and 176 deletions.
17 changes: 16 additions & 1 deletion app/assets/v2/css/forms/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
margin-bottom: 3rem;
}

.form__footer a {
font-weight: 500;
}

.form__footer button {
margin-bottom: .5rem;
}
Expand All @@ -63,9 +67,20 @@
.form__group {
flex-direction: column;
}

.form__group-item {
margin-bottom: 1em;
width: 100%;
}
}

@media (min-width: 992px) {
.form__footer a {
position: relative;
top: 10px;
}

.form__footer button {
float: right
}
}
4 changes: 4 additions & 0 deletions app/assets/v2/css/forms/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
width: 100%;
}

.form__input-lg {
font-size: 1rem;
}

.form__input_lg {
padding: 8px;
}
Expand Down
5 changes: 5 additions & 0 deletions app/assets/v2/css/forms/label.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
font-size: 12px;
margin: .5rem 0;
}

.form__label-lg {
font-size: 1rem;
margin: .7rem 0;
}
10 changes: 9 additions & 1 deletion app/assets/v2/css/grants/detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,17 @@ textarea.editable {
color: #43484D;
}

.article-description {
text-align:justify;
}

.no-subscriptions a {
text-decoration: none;
color: #007bff;
}

.article-date {
color: #BBBDBF;
color: #999;
}

.form__input {
Expand Down Expand Up @@ -132,6 +136,10 @@ textarea.editable {
background-color: white;
}

#js-postUpdate {
max-width: 40rem;
}

@keyframes rotation {
from {
transform: rotate(0deg);
Expand Down
20 changes: 16 additions & 4 deletions app/assets/v2/css/grants/milestones.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.milestones-edit {
float: right;
font-size: 0.75rem;
font-weight: 600;
}

.milestones-container {
Expand Down Expand Up @@ -58,7 +58,7 @@ ul.milestones-list .milestone-title {
ul.milestones-list .milestone-date {
margin-bottom: 0.3rem;
font-size: 14px;
color: #CCCCCC;
color: #000;
}

ul.milestones-list .milestone-date form {
Expand All @@ -68,23 +68,35 @@ ul.milestones-list .milestone-date form {
ul.milestones-list .milestone-date input {
border: 0;
font-size: 14px;
color: #CCCCCC;
color: #999;
}

ul.milestones-list .milestone-date .error {
color: #D50000;
font-size: 0.75rem;
}

ul.milestones-list .milestone-date a {
float: right;
margin-right: 0.3rem;
}

ul.milestones-list .milestone-description {
font-size: 14px;
font-size: .85rem;
color: #43484D;
}

.milestones-input input,
.milestones-input textarea {
margin-top: 20px;
}

ul.milestones-list .button {
font-size: 0.75rem;
font-weight: 600;
color: #fff;
}

ul.milestones-list .button:hover {
color: #fff;
}
7 changes: 6 additions & 1 deletion app/assets/v2/css/grants/new.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

.frequency .select2-container--default .select2-selection--single .select2-selection__rendered {
position: relative;
font-size: 1rem;
}

.frequency .select2-container--default .select2-selection--single .select2-selection__rendered,
Expand All @@ -29,7 +30,11 @@

.select2-container--default .select2-selection--multiple {
border-color: #000;
font-size: 0.8rem;
font-size: 1rem;
}

.select2-results__option, .select2-search--dropdown .select2-search__field {
font-size: 1rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
Expand Down
1 change: 1 addition & 0 deletions app/assets/v2/css/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
cursor: pointer;
color: var(--gc-purple);
padding: 0;
padding-bottom: 8px;
}

.section-tab:hover,
Expand Down
5 changes: 0 additions & 5 deletions app/assets/v2/js/grants/new.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
/* eslint-disable no-console */

const validate = () => {
if ($('#frequency_unit').select2('data')[0].text === 'any')
$('#frequency_count').val('0');
};

$(document).ready(function() {

if (localStorage['grants_quickstart_disable'] !== 'true') {
Expand Down
30 changes: 21 additions & 9 deletions app/grants/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class Meta:

model = Grant
fields = (
'title', 'description', 'reference_url', 'logo', 'logo_svg', 'admin_address', 'frequency',
'amount_goal', 'amount_received', 'token_address', 'contract_address', 'transaction_hash', 'metadata',
'network', 'required_gas_price', 'admin_profile', 'team_members'
'title', 'description', 'reference_url', 'logo', 'logo_svg', 'admin_address', 'frequency', 'amount_goal',
'amount_received', 'token_address', 'contract_address', 'transaction_hash', 'metadata', 'network',
'required_gas_price', 'admin_profile', 'team_members'
)


Expand All @@ -44,11 +44,23 @@ class Meta:
"""Define the metadata for the Milestone model form."""

model = Milestone
fields = (
'title', 'description', 'due_date',
)
fields = ('title', 'description', 'due_date', )
widgets = {
'title': forms.TextInput(attrs={'class': 'form__input', 'placeholder': _('Title')}),
'description': forms.Textarea(attrs={'class': 'form__input', 'placeholder': _('Description')}),
'due_date': forms.DateInput(attrs={'type': 'date', 'class': 'form__input', 'placeholder': _('Date')})
'title': forms.TextInput(attrs={
'class': 'form__input form__input-lg',
'placeholder': _('Title')
}),
'description':
forms.Textarea(attrs={
'class': 'form__input form__input-lg',
'placeholder': _('Description')
}),
'due_date':
forms.DateInput(
attrs={
'type': 'date',
'class': 'form__input form__input-lg',
'placeholder': _('Date')
}
)
}
3 changes: 2 additions & 1 deletion app/grants/templates/grants/cancel.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<body class="interior {{ active }} grant">
{% include 'shared/tag_manager_2.html' %}
<div class="container-fluid header dash">
{% include 'shared/nav.html' %}
{% include 'shared/top_nav.html' with class='d-md-flex' %}
{% include 'grants/nav.html' %}
<div class="row no-gutters metamask-banner">
<div class="col-12">
{% include 'shared/no_metamask_error.html' %}
Expand Down
1 change: 0 additions & 1 deletion app/grants/templates/grants/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
{% load i18n static humanize i18n %}
<link rel="stylesheet" href="{% static "v2/css/grants/card.css" %}">
<div class="grant-item">
<div class="grant-item__content py-4 px-3">
<h2 class="grant-item__title font-subheader"><a href="{% url 'grants:details' grant.id %}">{{ grant.title|truncatechars:60 }}</a></h2>
Expand Down
46 changes: 22 additions & 24 deletions app/grants/templates/grants/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
<body class="interior {{ active }} grant grant-detail g-font-muli">
{% include 'shared/tag_manager_2.html' %}
<div class="container-fluid header dash">
{% include 'shared/nav.html' %}
{% include 'shared/top_nav.html' with class='d-md-flex' %}
{% include 'grants/nav.html' %}
</div>

<div class="grant-banner">
Expand Down Expand Up @@ -176,9 +177,6 @@ <h1 class="grant__title font-title-xl mb-4">
{% empty %}
<div class="no-subscriptions">
<p class="mb-1">{% trans "No active subscriptions." %}</p>
<p class="mt-0">
<a href="{% url 'grants:fund' grant.id %}"> {% trans "Subscribe now!" %}</a>
</p>
</div>
{% endfor %}
</div>
Expand Down Expand Up @@ -226,33 +224,33 @@ <h1 class="grant__title font-title-xl mb-4">
<li><a href="#all-updates">{% trans "Updates" %}</a></li>
<li><a href="#github">{% trans "GitHub" %}</a></li>
</ul>
{% if is_admin %}
<div class="mt-4 py-2 px-3 px-md-5">
<form method="POST" id="js-postUpdate">
{% csrf_token %}
<div class="form__group-horizontal">
<input class="form__input" type="text" id="input-title" name="input-title" placeholder="{% trans 'Title' %}" required />
</div>
<div id="all-updates">
{% if is_admin %}
<div class="my-4 py-2 px-3">
<form method="POST" id="js-postUpdate">
{% csrf_token %}
<div class="form__group-horizontal mb-4">
<input class="form__input" type="text" id="input-title" name="input-title" placeholder="{% trans 'Title' %}" required />
</div>

<div class="form__group-horizontal">
<textarea class="form__input" type="text" id="input-description" name="description" placeholder="{% trans 'Describe the update' %}" required></textarea>
</div>
<div class="form__group-horizontal">
<textarea rows=8 class="form__input" type="text" id="input-description" name="description" placeholder="{% trans 'Describe the update' %}" required></textarea>
</div>

<div class="text-right">
<button class="button button--primary button__small">
<span class="font-body">{% trans "Post Update" %}</span>
</button>
<div class="text-left">
<button class="btn btn-gc-blue">
<span class="font-body">{% trans "Post Update" %}</span>
</button>
</div>
</form>
</div>
</form>
</div>
{% endif %}
<div id="all-updates">
{% endif %}
<ul>
{% for item in activity %}
<li>
<div class="article-title font-title">{{ item.title }}</div>
<div class="article-date font-body mb-2">{{ item.date }}</div>
<p class="article-description font-body">{{ item.description }}</p>
<p class="article-description font-subheader">{{ item.description }}</p>
</li>
{% empty %}
{% trans "No updates yet!" %}
Expand All @@ -265,7 +263,7 @@ <h1 class="grant__title font-title-xl mb-4">
<li>
<div class="article-title font-title">{{ item.title }}</div>
<div class="article-date font-body mb-2">{{ item.date }}</div>
<p class="article-description font-body">{{ item.description }}</p>
<p class="article-description font-subheader">{{ item.description }}</p>
</li>
{% empty %}
{% trans "No Github activity yet!" %}
Expand Down
3 changes: 2 additions & 1 deletion app/grants/templates/grants/fund.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
<body class="interior {{ active }} grant g-font-muli">
{% include 'shared/tag_manager_2.html' %}
<div class="container-fluid header dash">
{% include 'shared/nav.html' %}
{% include 'shared/top_nav.html' with class='d-md-flex' %}
{% include 'grants/nav.html' %}
<div class="row no-gutters metamask-banner">
<div class="col-12">
{% include 'shared/no_metamask_error.html' %}
Expand Down
4 changes: 3 additions & 1 deletion app/grants/templates/grants/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
<link rel="stylesheet" href="{% static "v2/css/search_bar.css" %}">
{% include 'shared/head.html' %}
{% include 'shared/cards.html' %}
<link rel="stylesheet" href="{% static "v2/css/grants/card.css" %}">
</head>
<body class="interior {{ active }} grant g-font-muli">
{% include 'shared/tag_manager_2.html' %}
<div class="container-fluid header dash">
{% include 'shared/nav.html' %}
{% include 'shared/top_nav.html' with class='d-md-flex' %}
{% include 'grants/nav.html' %}
</div>

<div class="container pt-5">
Expand Down
Loading

0 comments on commit 5fce377

Please sign in to comment.