🐛 Hide "I am the emitter" button on credit and debit interfaces

This commit is contained in:
Yohann D'ANELLO 2020-08-01 10:58:21 +02:00
parent 23b775447c
commit 82aa0182e3
2 changed files with 9 additions and 4 deletions

View File

@ -80,6 +80,7 @@ $(document).ready(function() {
let dest = $("#dest_note"); let dest = $("#dest_note");
$("#type_transfer").click(function() { $("#type_transfer").click(function() {
$("#source_me_div").removeClass('d-none');
$("#special_transaction_div").addClass('d-none'); $("#special_transaction_div").addClass('d-none');
source.attr('disabled', false); source.attr('disabled', false);
$("#source_note_list").removeClass('d-none'); $("#source_note_list").removeClass('d-none');
@ -88,6 +89,7 @@ $(document).ready(function() {
}); });
$("#type_credit").click(function() { $("#type_credit").click(function() {
$("#source_me_div").addClass('d-none');
$("#special_transaction_div").removeClass('d-none'); $("#special_transaction_div").removeClass('d-none');
$("#source_note_list").addClass('d-none'); $("#source_note_list").addClass('d-none');
$("#dest_note_list").removeClass('d-none'); $("#dest_note_list").removeClass('d-none');
@ -105,6 +107,7 @@ $(document).ready(function() {
}); });
$("#type_debit").click(function() { $("#type_debit").click(function() {
$("#source_me_div").addClass('d-none');
$("#special_transaction_div").removeClass('d-none'); $("#special_transaction_div").removeClass('d-none');
$("#source_note_list").removeClass('d-none'); $("#source_note_list").removeClass('d-none');
$("#dest_note_list").addClass('d-none'); $("#dest_note_list").addClass('d-none');

View File

@ -55,6 +55,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</ul> </ul>
<div class="card-body"> <div class="card-body">
<input class="form-control mx-auto d-block" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" /> <input class="form-control mx-auto d-block" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
<div id="source_me_div">
<hr> <hr>
<span class="form-control mx-auto d-block btn btn-secondary" id="source_me"> <span class="form-control mx-auto d-block btn btn-secondary" id="source_me">
{% trans "I am the emitter" %} {% trans "I am the emitter" %}
@ -62,6 +63,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="col-md-3" id="dests_div"> <div class="col-md-3" id="dests_div">
<div class="card border-info shadow mb-4"> <div class="card border-info shadow mb-4">