Skip to content

Commit

Permalink
chore: refactor basic payout
Browse files Browse the repository at this point in the history
- add title
- remove unused code + file
- unify UI
- add back to bounty
  • Loading branch information
thelostone-mc committed Oct 23, 2019
1 parent 73a2481 commit 65700c7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 76 deletions.
8 changes: 0 additions & 8 deletions app/assets/v2/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,6 @@ input[type=text].loading {
color: white;
}

.submit_bounty #network_status div {
display: inline;
}

#network_status div span {
color: #4aeba8;
}

.submit_bounty select[name=denomination] {
text-align: left;
}
Expand Down
10 changes: 5 additions & 5 deletions app/assets/v2/js/pages/process_bounty.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ window.onload = function() {
var account = web3.eth.accounts[0];

if (getParam('source')) {
$('input[name=issueURL]').val(getParam('source'));
$('#issueURL').html(getParam('source'));
}

$('#tipPercent').change(function() {
Expand Down Expand Up @@ -64,7 +64,7 @@ window.onload = function() {

};

var issueURL = $('input[name=issueURL]').val();
var issueURL = $('#issueURL').text();

waitforWeb3(function() {
var uri = '/api/v0.1/bounties/?github_url=' + issueURL + '&network=' + document.web3network;
Expand All @@ -85,7 +85,7 @@ window.onload = function() {
var pct = parseFloat($('#tipPercent').val()) * 0.01;

var email = '';
var github_url = $('#issueURL').val();
var github_url = $('#issueURL').text();
var from_name = document.contxt['github_handle'];
var username = getSelectedFulfillment() && getSelectedFulfillment().getAttribute('username');
var amountInEth = bounty_amount * pct;
Expand Down Expand Up @@ -117,7 +117,7 @@ window.onload = function() {
// get form data

var email = '';
var github_url = $('#issueURL').val();
var github_url = $('#issueURL').text();
var from_name = document.contxt['github_handle'];
var username = getSelectedFulfillment() && getSelectedFulfillment().getAttribute('username');
var amountInEth = selected_kudos.price_finney / 1000.0;
Expand Down Expand Up @@ -157,7 +157,7 @@ window.onload = function() {
}

e.preventDefault();
var issueURL = $('input[name=issueURL]').val();
var issueURL = $('#issueURL').text();
var fulfillmentId = getSelectedFulfillment() && getSelectedFulfillment().getAttribute('value');

sessionStorage['bountyId'] = getURLParams('pk');
Expand Down
26 changes: 17 additions & 9 deletions app/dashboard/templates/process_bounty.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,23 @@
</div>
<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">
<div class="text-center mb-3">
<h3>{% trans "Basic Payout" %}</h3>
<p><a href="{{action_urls.advanced_payout}}">Switch to Advanced Payout</a></p>
<img src="{% static "v2/images/prime.png" %}">
<p>
<a class="d-block" href="{{ bounty.url }}">
<i class="fas fa-chevron-left mr-1" style="font-size: 10px; position: relative;top: -1px;"></i>
Back to Bounty
</a>
<a href="{{action_urls.advanced_payout}}">Switch to Advanced Payout</a>
</p>
</div>
{% include 'shared/network_status.html' %}
<div class="w-100 mb-2">
<label for=issueURL>{% trans "Issue URL:" %}</label>
<input name='issueURL' id="issueURL" class="w-100 gc-round-text-input gc-border-blue" type="text" placeholder="https://github.com/user/repo/issues/n" value="{% if bounty %}{{bounty.github_url}}{%endif%}" />
<div>
<label for="issueTitle">{% trans "Issue Title" %}</label>
<p name="issueTitle" id="issueTitle" class="font-subheader">{{ bounty.title }}</p>
</div>
<div>
<label for="issueURL">{% trans "Issue URL" %}</label>
<p name="issueURL" id="issueURL" class="font-subheader">{{ bounty.github_url }}</p>
</div>
<div class="w-100 my-2">
<label for='bountyFulfillment'>{% trans "Bounty Submission:" %}</label>
Expand All @@ -93,7 +101,7 @@ <h3>{% trans "Basic Payout" %}</h3>
</div>
<div class="my-4">
<div class="d-flex justify-content-between align-items-center">
<h3 class="font-bigger-1 mb-0">Suggested Kudos</h3>
<h3 class="font-subheader mb-0">Suggested Kudos</h3>
<a href="{% url 'kudos_about' %}" target="_blank">What is kudos?</a>
</div>

Expand All @@ -106,7 +114,7 @@ <h3 class="font-bigger-1 mb-0">Suggested Kudos</h3>
{% include 'shared/bounty_actions_hidden_vars.html' %}
{% include 'shared/wallet_estimate.html' %}
</div>
<div class="w-100 mt-2 terms_container">
<div class="mt-4 terms_container">
<input name='terms' id='terms' type="checkbox" value=1 required />
<label for=terms>{% url "terms" as termsurl %}{% blocktrans %}I have read, understand, and agree to, the <a href="{{ termsurl }}" target="_blank" rel="noopener noreferrer">Terms of Service</a>.{% endblocktrans %}</label>
</div>
Expand Down
24 changes: 0 additions & 24 deletions app/dashboard/templates/shared/network_status.html

This file was deleted.

5 changes: 1 addition & 4 deletions app/faucet/templates/faucet_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@ <h3>{% trans "Faucet Request" %} <span id="alpha">{% trans "Alpha" %}</span></h3
{% endblocktrans %}
</p>
<div class="faucet-form-img">
<div class="faucet-form-svg">
<div class="faucet-form-svg mb-3">
{% include 'svgs/gas.svg' %}
</div>
</div>
<div class="hidden-mobile">
{% include 'shared/faucet_network_status.html' %}
</div>
<input type="hidden" id="currentFaucet" name="currentFaucet" value="{{ faucet_amount }}">
<p class="hidden-mobile">
{% trans "Please note, all input fields are required. Comment is optional." %}
Expand Down
26 changes: 0 additions & 26 deletions app/faucet/templates/shared/faucet_network_status.html

This file was deleted.

0 comments on commit 65700c7

Please sign in to comment.