2019-08-10 17:00:16 +00:00
|
|
|
{% extends "base.html" %}
|
2019-07-17 11:53:58 +00:00
|
|
|
{% comment %}
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
{% endcomment %}
|
|
|
|
|
2020-03-19 01:31:53 +00:00
|
|
|
{% load i18n static django_tables2 perms %}
|
2019-07-17 11:53:58 +00:00
|
|
|
|
|
|
|
{% block content %}
|
2020-08-18 12:27:04 +00:00
|
|
|
{# bandeau transfert/crédit/débit/activité #}
|
2020-03-13 00:57:32 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xl-12">
|
2020-08-30 13:49:06 +00:00
|
|
|
<div class="btn-group btn-group-toggle bg-light" style="width: 100%" data-toggle="buttons">
|
2020-07-29 20:55:12 +00:00
|
|
|
<label for="type_transfer" class="btn btn-sm btn-outline-primary active">
|
2020-03-14 14:13:58 +00:00
|
|
|
<input type="radio" name="transaction_type" id="type_transfer">
|
2020-03-14 16:40:31 +00:00
|
|
|
{% trans "Transfer" %}
|
2020-03-14 14:13:58 +00:00
|
|
|
</label>
|
2020-03-19 01:31:53 +00:00
|
|
|
{% if "note.notespecial"|not_empty_model_list %}
|
|
|
|
<label for="type_credit" class="btn btn-sm btn-outline-primary">
|
|
|
|
<input type="radio" name="transaction_type" id="type_credit">
|
|
|
|
{% trans "Credit" %}
|
|
|
|
</label>
|
2020-08-31 21:06:21 +00:00
|
|
|
<label for="type_debit" class="btn btn-sm btn-outline-primary">
|
|
|
|
<input type="radio" name="transaction_type" id="type_debit">
|
|
|
|
{% trans "Debit" %}
|
|
|
|
</label>
|
2020-03-19 01:31:53 +00:00
|
|
|
{% endif %}
|
2020-04-06 05:06:52 +00:00
|
|
|
{% for activity in activities_open %}
|
|
|
|
<a href="{% url "activity:activity_entry" pk=activity.pk %}" class="btn btn-sm btn-outline-primary">
|
|
|
|
{% trans "Entries" %} {{ activity.name }}
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
2020-03-14 14:13:58 +00:00
|
|
|
</div>
|
2020-03-13 00:57:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-30 13:49:06 +00:00
|
|
|
<hr>
|
2020-03-12 22:12:49 +00:00
|
|
|
<div class="row">
|
2020-08-21 12:21:26 +00:00
|
|
|
{# Preview note profile (picture, username and balance) #}
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="col-md-3" id="note_infos_div">
|
2020-08-21 12:21:26 +00:00
|
|
|
<div class="card bg-light border-success shadow mb-4">
|
2020-08-05 17:52:36 +00:00
|
|
|
<a id="profile_pic_link" href="#"><img src="/media/pic/default.png"
|
2020-08-31 21:06:21 +00:00
|
|
|
id="profile_pic" alt="" class="img-fluid rounded mx-auto"></a>
|
2020-03-22 21:35:07 +00:00
|
|
|
<div class="card-body text-center">
|
|
|
|
<span id="user_note"></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-21 12:21:26 +00:00
|
|
|
|
|
|
|
{# list of emitters #}
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="col-md-3" id="emitters_div">
|
2020-08-21 12:21:26 +00:00
|
|
|
<div class="card bg-light border-success shadow mb-4">
|
2020-03-12 22:12:49 +00:00
|
|
|
<div class="card-header">
|
|
|
|
<p class="card-text font-weight-bold">
|
2020-08-31 21:06:21 +00:00
|
|
|
<label for="source_note" id="source_note_label">{% trans "Select emitters" %}</label>
|
2020-03-12 22:12:49 +00:00
|
|
|
</p>
|
2019-07-17 11:53:58 +00:00
|
|
|
</div>
|
2020-03-12 22:12:49 +00:00
|
|
|
<ul class="list-group list-group-flush" id="source_note_list">
|
|
|
|
</ul>
|
|
|
|
<div class="card-body">
|
2020-08-31 21:06:21 +00:00
|
|
|
<select id="credit_type" class="custom-select d-none">
|
|
|
|
{% for special_type in special_types %}
|
|
|
|
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<input class="form-control mx-auto" type="text" id="source_note" placeholder="{% trans "Name or alias..." %}" />
|
2020-08-01 08:58:21 +00:00
|
|
|
<div id="source_me_div">
|
|
|
|
<hr>
|
2020-08-31 21:06:21 +00:00
|
|
|
<span class="form-control mx-auto btn btn-secondary" id="source_me">
|
2020-08-01 08:58:21 +00:00
|
|
|
{% trans "I am the emitter" %}
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-03-12 22:12:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-21 12:21:26 +00:00
|
|
|
|
|
|
|
{# list of receiver #}
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="col-md-3" id="dests_div">
|
2020-08-21 12:21:26 +00:00
|
|
|
<div class="card bg-light border-info shadow mb-4">
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="card-header">
|
|
|
|
<p class="card-text font-weight-bold" id="dest_title">
|
2020-08-31 21:06:21 +00:00
|
|
|
<label for="dest_note" id="dest_note_label">{% trans "Select receivers" %}</label>
|
2020-04-10 20:43:55 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<ul class="list-group list-group-flush" id="dest_note_list">
|
|
|
|
</ul>
|
|
|
|
<div class="card-body">
|
2020-08-31 21:06:21 +00:00
|
|
|
<select id="debit_type" class="custom-select d-none">
|
|
|
|
{% for special_type in special_types %}
|
|
|
|
<option value="{{ special_type.id }}">{{ special_type.special_type }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<input class="form-control mx-auto" type="text" id="dest_note" placeholder="{% trans "Name or alias..." %}" />
|
2020-04-10 20:43:55 +00:00
|
|
|
<ul class="list-group list-group-flush" id="dest_alias_matched">
|
2020-03-19 01:31:53 +00:00
|
|
|
</ul>
|
2020-04-10 20:43:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-21 12:21:26 +00:00
|
|
|
|
|
|
|
{# Information on transaction (amount, reason, name,...) #}
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="col-md-3" id="external_div">
|
2020-08-21 12:21:26 +00:00
|
|
|
<div class="card bg-light border-warning shadow mb-4">
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="card-header">
|
|
|
|
<p class="card-text font-weight-bold">
|
|
|
|
{% trans "Action" %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<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="amount">{% trans "Amount" %} :</label>
|
|
|
|
{% include "note/amount_input.html" with widget=amount_widget %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<label for="reason">{% trans "Reason" %} :</label>
|
2020-08-31 21:06:21 +00:00
|
|
|
<input class="form-control mx-auto" type="text" id="reason" />
|
2020-07-31 19:24:23 +00:00
|
|
|
<p id="reason-required" class="invalid-feedback"></p>
|
2020-04-10 20:43:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-18 12:27:04 +00:00
|
|
|
{# in case of special transaction add identity information #}
|
2020-04-10 20:43:55 +00:00
|
|
|
<div class="d-none" id="special_transaction_div">
|
2020-03-19 01:31:53 +00:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<label for="last_name">{% trans "Name" %} :</label>
|
|
|
|
<input type="text" id="last_name" class="form-control" />
|
|
|
|
</div>
|
2020-03-14 14:13:58 +00:00
|
|
|
</div>
|
2020-03-19 01:31:53 +00:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<label for="first_name">{% trans "First name" %} :</label>
|
|
|
|
<input type="text" id="first_name" 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>
|
2020-03-14 14:13:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-10 20:43:55 +00:00
|
|
|
<hr>
|
|
|
|
<div class="form-row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<button id="btn_transfer" class="form-control btn btn-primary">{% trans 'Transfer' %}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-14 14:13:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-12 22:12:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-08-18 12:27:04 +00:00
|
|
|
{# transaction history #}
|
2020-03-16 11:11:16 +00:00
|
|
|
<div class="card shadow mb-4" id="history">
|
|
|
|
<div class="card-header">
|
|
|
|
<p class="card-text font-weight-bold">
|
|
|
|
{% trans "Recent transactions history" %}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% render_table table %}
|
|
|
|
</div>
|
2020-03-12 22:12:49 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block extrajavascript %}
|
|
|
|
<script>
|
2020-03-17 17:47:16 +00:00
|
|
|
TRANSFER_POLYMORPHIC_CTYPE = {{ polymorphic_ctype }};
|
|
|
|
SPECIAL_TRANSFER_POLYMORPHIC_CTYPE = {{ special_polymorphic_ctype }};
|
|
|
|
user_id = {{ user.note.pk }};
|
2020-07-31 17:00:19 +00:00
|
|
|
username = "{{ user.username|escapejs }}";
|
2020-08-31 21:06:21 +00:00
|
|
|
|
|
|
|
select_emitter_label = "{% trans "Select emitter" %}";
|
|
|
|
select_emitters_label = "{% trans "Select emitters" %}";
|
|
|
|
select_receveir_label = "{% trans "Select receiver" %}";
|
|
|
|
select_receveirs_label = "{% trans "Select receivers" %}";
|
|
|
|
transfer_type_label = "{% trans "Transfer type" %}";
|
2020-03-12 22:12:49 +00:00
|
|
|
</script>
|
2020-03-17 17:47:16 +00:00
|
|
|
<script src="/static/js/transfer.js"></script>
|
2019-08-10 17:00:16 +00:00
|
|
|
{% endblock %}
|