diff --git a/apps/note/templates/note/conso_form.html b/apps/note/templates/note/conso_form.html index d5914055f184728456dc4008d645e231303929b6..396c313cb5f30496afdbe5b05240a89a89ed8848 100644 --- a/apps/note/templates/note/conso_form.html +++ b/apps/note/templates/note/conso_form.html @@ -10,22 +10,22 @@ SPDX-License-Identifier: GPL-3.0-or-later {% block content %} <div class="row mt-4"> <div class="col-sm-5 col-md-4" id="infos_div"> - <div class="row"> + <div class="row justify-content-center justify-content-md-end"> {# User details column #} - <div class="col"> - <div class="card bg-light border-success mb-4 text-center"> + <div class="col picture-col"> + <div class="card bg-light mb-4 text-center"> <a id="profile_pic_link" href="#"> <img src="{% static "member/img/default_picture.png" %}" - id="profile_pic" alt="" class="card-img-top"> + id="profile_pic" alt="" class="card-img-top d-none d-sm-block"> </a> - <div class="card-body text-center text-break"> - <span id="user_note"></span> + <div class="card-body text-center text-break px-1 py-2"> + <span id="user_note"><i>{% trans "Please select an user" %}</i></span> </div> </div> </div> {# User selection column #} - <div class="col-xl-7" id="user_select_div"> + <div class="col-xl" id="user_select_div"> <div class="card bg-light border-success mb-4"> <div class="card-header"> <p class="card-text font-weight-bold"> @@ -44,6 +44,7 @@ SPDX-License-Identifier: GPL-3.0-or-later </div> </div> </div> + {# Summary of consumption and consume button #} <div class="col-xl-5 d-none" id="consos_list_div"> <div class="card bg-light border-info mb-4"> @@ -65,7 +66,6 @@ SPDX-License-Identifier: GPL-3.0-or-later </div> </div> - {# Show last used buttons #} <div class="card bg-light mb-4"> <div class="card-header"> diff --git a/apps/note/templates/note/transaction_form.html b/apps/note/templates/note/transaction_form.html index f5ff0b737b276e2d598b9f4f0d3302a18f014988..7ffb7dc13517cadc7435e593346d05f0e123c0b4 100644 --- a/apps/note/templates/note/transaction_form.html +++ b/apps/note/templates/note/transaction_form.html @@ -34,21 +34,21 @@ SPDX-License-Identifier: GPL-2.0-or-later </div> </div> <hr> - <div class="row"> + <div class="row justify-content-center"> {# Preview note profile (picture, username and balance) #} - <div class="col-md-3" id="note_infos_div"> - <div class="card bg-light border-success shadow mb-4 pt-4 text-center"> + <div class="col-md picture-col" id="note_infos_div"> + <div class="card bg-light mb-4 text-center"> <a id="profile_pic_link" href="#"><img src="{% static "member/img/default_picture.png" %}" id="profile_pic" alt="" class="img-fluid rounded mx-auto"></a> - <div class="card-body text-center"> - <span id="user_note"></span> + <div class="card-body text-center px-1 py-2"> + <span id="user_note"><i>{% trans "Please select an user" %}</i></span> </div> </div> </div> {# list of emitters #} <div class="col-md-3" id="emitters_div"> - <div class="card bg-light border-success shadow mb-4"> + <div class="card bg-light mb-4"> <div class="card-header"> <p class="card-text font-weight-bold"> <label for="source_note" id="source_note_label">{% trans "Select emitters" %}</label> @@ -75,7 +75,7 @@ SPDX-License-Identifier: GPL-2.0-or-later {# list of receiver #} <div class="col-md-3" id="dests_div"> - <div class="card bg-light border-info shadow mb-4"> + <div class="card bg-light mb-4"> <div class="card-header"> <p class="card-text font-weight-bold" id="dest_title"> <label for="dest_note" id="dest_note_label">{% trans "Select receivers" %}</label> @@ -97,8 +97,8 @@ SPDX-License-Identifier: GPL-2.0-or-later </div> {# Information on transaction (amount, reason, name,...) #} - <div class="col-md-3" id="external_div"> - <div class="card bg-light border-warning shadow mb-4"> + <div class="col-md" id="external_div"> + <div class="card bg-light mb-4"> <div class="card-header"> <p class="card-text font-weight-bold"> {% trans "Action" %} @@ -153,7 +153,7 @@ SPDX-License-Identifier: GPL-2.0-or-later </div> </div> {# transaction history #} - <div class="card shadow mb-4" id="history"> + <div class="card mb-4" id="history"> <div class="card-header"> <p class="card-text font-weight-bold"> {% trans "Recent transactions history" %} diff --git a/note_kfet/static/css/custom.css b/note_kfet/static/css/custom.css index 5d901c9d93c4de2af916b4b5fe3171ce8ae7d6c2..1f7cf76346531b0ad739d78efb70b45a6a34c4a1 100644 --- a/note_kfet/static/css/custom.css +++ b/note_kfet/static/css/custom.css @@ -22,6 +22,11 @@ border-bottom-color: rgba(0, 0, 0, .250); } +/* Fixed width picture column */ +.picture-col { + max-width: 202px; +} + /* Limit fluid container to a max size */ .container-fluid { max-width: 1600px; diff --git a/note_kfet/static/js/consos.js b/note_kfet/static/js/consos.js index 5a7e61449816900531a65c51224515c2f28bc2cb..78909600c71a52c1d1b7556faeec762f5f3a0b7f 100644 --- a/note_kfet/static/js/consos.js +++ b/note_kfet/static/js/consos.js @@ -29,7 +29,6 @@ $(document).ready(function () { // Switching in double consumptions mode should update the layout $('#double_conso').change(function () { $('#consos_list_div').removeClass('d-none') - $('#user_select_div').attr('class', 'col-xl-4') $('#infos_div').attr('class', 'col-sm-5 col-xl-6') const note_list_obj = $('#note_list') @@ -48,7 +47,6 @@ $(document).ready(function () { $('#single_conso').change(function () { $('#consos_list_div').addClass('d-none') - $('#user_select_div').attr('class', 'col-xl-7') $('#infos_div').attr('class', 'col-sm-5 col-md-4') const consos_list_obj = $('#consos_list')