Skip to content
Snippets Groups Projects
Commit 910b3ecf authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#596 - added button to remove recurring options while on new transaction/transfer page

parent 3b4d18e8
No related branches found
No related tags found
No related merge requests found
......@@ -305,7 +305,8 @@ transaction.new.label.transfer.account=Zielkonto
transaction.new.label.repeating=Wiederholung
transaction.new.label.repeating.all=Alle
repeating.button=Wiederholung hinzufügen
repeating.button.add=Wiederholung hinzufügen
repeating.button.remove=Wiederholung entfernen
repeating.modifier.days=Tage
repeating.modifier.months=Monate
......
......@@ -306,7 +306,8 @@ transaction.new.label.transfer.account=Destination Account
transaction.new.label.repeating=Repeating
transaction.new.label.repeating.all=Every
repeating.button=Add repetition
repeating.button.add=Add repetition
repeating.button.remove=Remove repetition
repeating.modifier.days=Days
repeating.modifier.months=Months
......
......@@ -266,12 +266,23 @@ $(document).ready(function()
$('#button-transaction-add-repeating-option').click(function()
{
document.getElementById('button-transaction-add-repeating-option').classList.toggle('hidden', true);
document.getElementsByName('isRepeating')[0].value = true;
document.getElementById('transaction-repeating-option').classList.toggle('hidden', false);
toggleRepeatingOptions(true);
});
$('#button-transaction-remove-repeating-option').click(function()
{
toggleRepeatingOptions(false);
});
});
function toggleRepeatingOptions(show)
{
document.getElementById('button-transaction-add-repeating-option').classList.toggle('hidden', show);
document.getElementsByName('isRepeating')[0].value = show;
document.getElementById('transaction-repeating-option').classList.toggle('hidden', !show);
document.getElementById('button-transaction-remove-repeating-option').classList.toggle('hidden', !show);
}
function isHidden(el)
{
let style = window.getComputedStyle(el);
......
......@@ -156,7 +156,7 @@
<#macro transactionRepeating transaction currentDate>
<div class="row <#if transaction.isRepeating()>hidden</#if>">
<div class="col s12 center-align">
<@header.buttonLink url='' icon='repeat' localizationKey='repeating.button' id='button-transaction-add-repeating-option' color='background-blue-baby' noUrl=true classes="text-black"/>
<@header.buttonLink url='' icon='repeat' localizationKey='repeating.button.add' id='button-transaction-add-repeating-option' color='background-blue-baby' noUrl=true classes="text-black"/>
</div>
</div>
......@@ -174,6 +174,12 @@
<@repeatingEndOption transaction currentDate/>
</div>
<div class="row">
<div class="col s12 center-align">
<@header.buttonLink url='' icon='delete' localizationKey='repeating.button.remove' id='button-transaction-remove-repeating-option' color='background-blue-baby' noUrl=true classes="text-black hidden"/>
</div>
</div>
</#macro>
<#macro repeatingModifier transaction>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment