Skip to content
Snippets Groups Projects
Commit 7a4f929b authored by ynerant's avatar ynerant
Browse files

Credit and debit buttons are hidden when there is no right to see special notes

parent 730d37c6
No related branches found
No related tags found
1 merge request!10Système de droits
Pipeline #7966 passed with warnings with stages
in 4 minutes and 18 seconds
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
SPDX-License-Identifier: GPL-2.0-or-later SPDX-License-Identifier: GPL-2.0-or-later
{% endcomment %} {% endcomment %}
{% load i18n static django_tables2 %} {% load i18n static django_tables2 perms %}
{% block content %} {% block content %}
...@@ -18,14 +18,16 @@ SPDX-License-Identifier: GPL-2.0-or-later ...@@ -18,14 +18,16 @@ SPDX-License-Identifier: GPL-2.0-or-later
<input type="radio" name="transaction_type" id="type_transfer"> <input type="radio" name="transaction_type" id="type_transfer">
{% trans "Transfer" %} {% trans "Transfer" %}
</label> </label>
<label for="type_credit" class="btn btn-sm btn-outline-primary"> {% if "note.notespecial"|not_empty_model_list %}
<input type="radio" name="transaction_type" id="type_credit"> <label for="type_credit" class="btn btn-sm btn-outline-primary">
{% trans "Credit" %} <input type="radio" name="transaction_type" id="type_credit">
</label> {% trans "Credit" %}
<label type="type_debit" class="btn btn-sm btn-outline-primary"> </label>
<input type="radio" name="transaction_type" id="type_debit"> <label type="type_debit" class="btn btn-sm btn-outline-primary">
{% trans "Debit" %} <input type="radio" name="transaction_type" id="type_debit">
</label> {% trans "Debit" %}
</label>
{% endif %}
</div> </div>
</div> </div>
</div> </div>
...@@ -58,47 +60,49 @@ SPDX-License-Identifier: GPL-2.0-or-later ...@@ -58,47 +60,49 @@ SPDX-License-Identifier: GPL-2.0-or-later
</div> </div>
</div> </div>
<div class="col-md-4" id="external_div" style="display: none;"> {% if "note.notespecial"|not_empty_model_list %}
<div class="card border-success shadow mb-4"> <div class="col-md-4" id="external_div" style="display: none;">
<div class="card-header"> <div class="card border-success shadow mb-4">
<p class="card-text font-weight-bold"> <div class="card-header">
{% trans "External payment" %} <p class="card-text font-weight-bold">
</p> {% trans "External payment" %}
</div> </p>
<ul class="list-group list-group-flush" id="source_note_list">
</ul>
<div class="card-body">
<div class="form-row">
<div class="col-md-12">
<label for="credit_type">{% trans "Transfer type" %} :</label>
<select id="credit_type" class="custom-select">
{% for special_type in special_types %}
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
{% endfor %}
</select>
</div>
</div> </div>
<div class="form-row"> <ul class="list-group list-group-flush" id="source_note_list">
<div class="col-md-12"> </ul>
<label for="last_name">{% trans "Name" %} :</label> <div class="card-body">
<input type="text" id="last_name" class="form-control" /> <div class="form-row">
<div class="col-md-12">
<label for="credit_type">{% trans "Transfer type" %} :</label>
<select id="credit_type" class="custom-select">
{% for special_type in special_types %}
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
{% endfor %}
</select>
</div>
</div> </div>
</div> <div class="form-row">
<div class="form-row"> <div class="col-md-12">
<div class="col-md-12"> <label for="last_name">{% trans "Name" %} :</label>
<label for="first_name">{% trans "First name" %} :</label> <input type="text" id="last_name" class="form-control" />
<input type="text" id="first_name" class="form-control" /> </div>
</div> </div>
</div> <div class="form-row">
<div class="form-row"> <div class="col-md-12">
<div class="col-md-12"> <label for="first_name">{% trans "First name" %} :</label>
<label for="bank">{% trans "Bank" %} :</label> <input type="text" id="first_name" class="form-control" />
<input type="text" id="bank" class="form-control" /> </div>
</div>
<div class="form-row">
<div class="col-md-12">
<label for="bank">{% trans "Bank" %} :</label>
<input type="text" id="bank" class="form-control" />
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> {% endif %}
<div class="col-md-8" id="dests_div"> <div class="col-md-8" id="dests_div">
<div class="card border-info shadow mb-4"> <div class="card border-info shadow mb-4">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment