Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 5b5bf15

Browse files
committed
Merge pull request #1381 from programmerpeter/issue1158
Resolved #1158
2 parents a50361d + b2573cd commit 5b5bf15

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

js/languages/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@
324324
"ModeratorFee": "Fee:",
325325
"PriceForOne": "Price per single item, file, or service.",
326326
"Avatar": "Avatar",
327+
"AdditionalPaymentData": "Additional payment data",
328+
"AdditionalPaymentDataInfo": "Include message and label in payment QR code.",
327329
"firewall": {
328330
"Open": "Open",
329331
"Restricted": "Restricted",

js/languages/pl.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@
324324
"ModeratorFee": "Prowizja:",
325325
"PriceForOne": "Cena za pojedynczy przedmiot, plik lub usługę.",
326326
"Avatar": "Awatar",
327+
"AdditionalPaymentData": "Dodatkowe informacje o płatności",
328+
"AdditionalPaymentDataInfo": "Umieszczaj wiadomość i etykietę w kodzie QR płatności.",
327329
"firewall": {
328330
"Open": "Otwarty",
329331
"Restricted": "Ograniczony",

js/templates/settings.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,24 @@ <h3 class="padding15 margin0 fontWeight500"><%= polyglot.t('Advanced') %></h3>
11901190
</div>
11911191

11921192
</div>
1193+
1194+
<div class="flexRow">
1195+
<div class="flexCol-3 borderRight custCol-border">
1196+
<div class="fieldItem">
1197+
<label>
1198+
<%= polyglot.t('AdditionalPaymentData') %>
1199+
<i class="ion-help-circled tooltip tooltip-box" data-tooltip="<%= polyglot.t('AdditionalPaymentDataInfo') %>"></i>
1200+
</label>
1201+
</div>
1202+
</div>
1203+
1204+
<div class="flexCol-9 borderRight0 custCol-border">
1205+
<div class="fieldItem">
1206+
<input type="radio" class="fieldItem" id="additional_payment_data_yes" name="additionalPaymentData" value="true" checked /><label for="additional_payment_data_yes" class="radioLabel"><%= polyglot.t('Yes') %></label>
1207+
<input type="radio" class="fieldItem" id="additional_payment_data_no" name="additionalPaymentData" value="false" /><label for="additional_payment_data_no" class="radioLabel"><%= polyglot.t('No') %></label>
1208+
</div>
1209+
</div>
1210+
</div>
11931211

11941212
<div class="flexRow">
11951213

js/views/buyWizardVw.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,12 @@ module.exports = baseVw.extend({
511511
totalBTCPrice = data.amount;
512512
this.$el.find('.js-buyWizardDetailsTotalBTC').text(totalBTCPrice);
513513
this.payURL = data.payment_address;
514-
payHREF = "bitcoin://"+ data.payment_address+"?amount="+totalBTCPrice+"&label="+storeName+"&message="+message;
514+
515+
payHREF = "bitcoin://"+ data.payment_address+"?amount="+totalBTCPrice;
516+
if(localStorage.getItem('AdditionalPaymentData') != "false") {
517+
payHREF += "&label="+storeName+"&message="+message;
518+
}
519+
515520
this.hideMaps();
516521
this.$el.find('.js-buyWizardPay').removeClass('hide');
517522
dataURI = qr(payHREF, {type: 10, size: 10, level: 'M'});

js/views/settingsVw.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ module.exports = Backbone.View.extend({
394394
this.$("#generalForm input[name=notifications][value=" + notifications + "]").prop('checked', true);
395395
this.$("#storeForm input[name=vendor][value=" + vendorStatus + "]").prop('checked', true);
396396
this.$("#advancedForm input[name=notFancy][value=" + fancyStatus + "]").prop('checked', true);
397+
this.$("#advancedForm input[name=additionalPaymentData][value=" + localStorage.getItem('AdditionalPaymentData') + "]").prop('checked', true);
397398

398399
currecyList = __.uniq(currecyList, function(item){return item.code;});
399400
currecyList = currecyList.sort(function(a,b){
@@ -929,6 +930,8 @@ module.exports = Backbone.View.extend({
929930

930931
$saveBtn.addClass('loading');
931932

933+
localStorage.setItem('AdditionalPaymentData', this.$('#advancedForm input[name=additionalPaymentData]:checked').val());
934+
932935
saveToAPI(form, this.userModel.toJSON(), self.serverUrl + "settings", function(){
933936
app.statusBar.pushMessage({
934937
type: 'confirmed',

0 commit comments

Comments
 (0)