search field placholder adjusted to testnet

master
moneroexamples 8 years ago
parent e64413bc12
commit 2b121ceb03

@ -758,6 +758,7 @@ namespace xmreg {
// initalise page tempate map with basic info about blockchain
mstch::map context {
{"testnet" , testnet},
{"blk_hash" , blk_hash_str},
{"blk_height" , _blk_height},
{"blk_timestamp" , blk_timestamp},
@ -976,6 +977,7 @@ namespace xmreg {
// initalise page tempate map with basic info about blockchain
mstch::map context {
{"testnet" , testnet},
{"tx_hash" , tx_hash_str},
{"tx_pub_key" , REMOVE_HASH_BRAKETS(fmt::format("{:s}", txd.pk))},
{"blk_height" , tx_blk_height_str},
@ -1360,6 +1362,7 @@ namespace xmreg {
// initalise page tempate map with basic info about blockchain
mstch::map context {
{"testnet" , testnet},
{"tx_hash" , tx_hash_str},
{"xmr_address" , xmr_address_str},
{"viewkey" , viewkey_str},
@ -1536,19 +1539,19 @@ namespace xmreg {
// parse string representing given monero address
cryptonote::account_public_address address;
bool testnet {false};
bool testnet_addr {false};
if (search_text[0] == '9' || search_text[0] == 'A')
testnet = true;
testnet_addr = true;
if (!xmreg::parse_str_address(search_text, address, testnet))
if (!xmreg::parse_str_address(search_text, address, testnet_addr))
{
cerr << "Cant parse string address: " << search_text << endl;
return string("Cant parse address (probably incorrect format): ")
+ search_text;
}
return show_address_details(address, testnet);
return show_address_details(address, testnet_addr);
}
// check if integrated monero address is given based on its length
@ -1977,6 +1980,7 @@ namespace xmreg {
// initalise page tempate map with basic info about blockchain
mstch::map context {
{"testnet" , testnet},
{"search_text" , search_text},
{"no_results" , true},
{"to_many_results", false}

@ -89,10 +89,22 @@
<h4 style="font-size: 15px; margin: 0px">(no javascript - no cookies - no web analytics trackers - no images - open sourced)</h4>
</div>
<div class="center">
<form action="/search" method="get" style="width:100%; margin-top:15px" class="style-1">
<input type="text" name="value" size="100"
placeholder="blk height, blk hash, tx hash, tx payment id, encrypted payment id, tx public key, input key image, and stealth address">
<input type="submit" value="Search">
</form>
</div>
{{^testnet}}
<div class="center">
<form action="/search" method="get" style="width:100%; margin-top:15px" class="style-1">
<input type="text" name="value" size="100"
placeholder="blk height, blk hash, tx hash, tx payment id, encrypted payment id, tx public key, input key image, and stealth address">
<input type="submit" value="Search">
</form>
</div>
{{/testnet}}
{{#testnet}}
<div class="center">
<form action="/search" method="get" style="width:100%; margin-top:15px" class="style-1">
<input type="text" name="value" size="100"
placeholder="blk height, blk hash, tx hash, tx payment id">
<input type="submit" value="Search">
</form>
</div>
{{/testnet}}

Loading…
Cancel
Save