Skip to content

Commit

Permalink
#81 more html
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 14, 2018
1 parent a0daae5 commit d45bcbc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/test_wts.rb
Expand Up @@ -69,7 +69,7 @@ def test_not_found
def test_200_user_pages
WebMock.allow_net_connect!
login('bill')
['/home', '/key', '/log', '/invoice', '/api', '/btc'].each do |p|
['/home', '/key', '/pay', '/log', '/invoice', '/api', '/btc'].each do |p|
get(p)
assert_equal(200, last_response.status, "#{p} fails: #{last_response.body}")
end
Expand Down
5 changes: 5 additions & 0 deletions views/btc.haml
Expand Up @@ -49,3 +49,8 @@
format:
%input{type: 'text', name: 'btc', maxlength: 36, size: 45, autocomplete: 'off'}
%input{type: 'submit', onclick: "return confirm('Are you sure? This operation is not reversable!')"}

%p
This
%a{href: 'https://blog.zold.io/2018/12/09/btc-to-zld.html'} blog post
explains how this exchange mechanism works.
11 changes: 6 additions & 5 deletions views/pay.haml
@@ -1,20 +1,21 @@
%p
Your available balance:
= confirmed_user.wallet(&:balance)
Your current balance is
= succeed '.' do
%code= confirmed_user.wallet(&:balance)

%form{method: 'POST', action: '/do-pay'}
%fieldset
%label
Your
= succeed ':' do
%a{href: 'https://blog.zold.io/2018/07/18/keygap.html'} keygap
%input{type: 'text', name: 'keygap', placeholder: 'Your secret...', autocomplete: 'off'}
%input{type: 'text', name: 'keygap', placeholder: 'Your secret...', autocomplete: 'off', required: true}
%label
Send ZLD to (either wallet ID or GitHub login):
%input{type: 'text', name: 'bnf', maxlength: 128, size: 25, placeholder: 'e.g. "@yegor256"', autocomplete: 'off'}
%input{type: 'text', name: 'bnf', maxlength: 128, size: 25, placeholder: 'e.g. "@yegor256"', autocomplete: 'off', required: true}
%label
The amount to pay, ZLD:
%input{type: 'text', name: 'amount', maxlength: 32, size: 15, placeholder: 'e.g. "14.95"', autocomplete: 'off'}
%input{type: 'text', name: 'amount', maxlength: 32, size: 15, placeholder: 'e.g. "14.95"', autocomplete: 'off', required: true}
%label
Payment details:
%input{type: 'text', name: 'details', maxlength: 512, style: 'width:100%', placeholder: 'e.g. "For services"', autocomplete: 'off'}
Expand Down
3 changes: 3 additions & 0 deletions views/remotes.haml
Expand Up @@ -24,3 +24,6 @@
The list has been updated
%strong= Zold::Age.new(remotes.mtime)
ago.
FYI, the entire network is visible
= succeed '.' do
%a{href: 'http://www.zold.io/health.html'} here

0 comments on commit d45bcbc

Please sign in to comment.