From 227cb2a8017b186c747df1cd06d5ac6b3f6cee8d Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <yohann.danello@gmail.com> Date: Sun, 30 Aug 2020 15:49:06 +0200 Subject: [PATCH] Add light background to "Gift/Transfer" buttons --- apps/activity/templates/activity/activity_entry.html | 6 ++++-- apps/note/templates/note/transaction_form.html | 3 ++- note_kfet/static/js/transfer.js | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/activity/templates/activity/activity_entry.html b/apps/activity/templates/activity/activity_entry.html index e4bd4416..6b3b892e 100644 --- a/apps/activity/templates/activity/activity_entry.html +++ b/apps/activity/templates/activity/activity_entry.html @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% block content %} <div class="row"> <div class="col-xl-12"> - <div class="btn-group btn-group-toggle" style="width: 100%; padding: 0 0 2em 0" data-toggle="buttons"> + <div class="btn-group btn-group-toggle bg-light" style="width: 100%" data-toggle="buttons"> <a href="{% url "note:transfer" %}#transfer" class="btn btn-sm btn-outline-primary"> {% trans "Transfer" %} </a> @@ -27,6 +27,8 @@ SPDX-License-Identifier: GPL-3.0-or-later </div> </div> +<hr> + <a href="{% url "activity:activity_detail" pk=activity.pk %}"> <button class="btn btn-light">{% trans "Return to activity page" %}</button> </a> @@ -35,7 +37,7 @@ SPDX-License-Identifier: GPL-3.0-or-later <hr> -<div id="entry_table"> +<div class="card" id="entry_table"> <h2 class="text-center">{{ entries.count }} {% if entries.count >= 2 %}{% trans "entries" %}{% else %}{% trans "entry" %}{% endif %}</h2> {% render_table table %} diff --git a/apps/note/templates/note/transaction_form.html b/apps/note/templates/note/transaction_form.html index a910b4a1..86dd6e87 100644 --- a/apps/note/templates/note/transaction_form.html +++ b/apps/note/templates/note/transaction_form.html @@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-2.0-or-later {# bandeau transfert/crédit/débit/activité #} <div class="row"> <div class="col-xl-12"> - <div class="btn-group btn-group-toggle" style="width: 100%; padding: 0 0 2em 0" data-toggle="buttons"> + <div class="btn-group btn-group-toggle bg-light" style="width: 100%" data-toggle="buttons"> <label for="type_transfer" class="btn btn-sm btn-outline-primary active"> <input type="radio" name="transaction_type" id="type_transfer"> {% trans "Transfer" %} @@ -34,6 +34,7 @@ SPDX-License-Identifier: GPL-2.0-or-later </div> </div> </div> + <hr> <div class="row"> {# Preview note profile (picture, username and balance) #} <div class="col-md-3" id="note_infos_div"> diff --git a/note_kfet/static/js/transfer.js b/note_kfet/static/js/transfer.js index aba8d684..df0effa1 100644 --- a/note_kfet/static/js/transfer.js +++ b/note_kfet/static/js/transfer.js @@ -169,9 +169,6 @@ $(document).ready(function() { type_transfer.removeAttr('checked'); $("#type_credit").removeAttr('checked'); $("#type_debit").removeAttr('checked'); - $("label[for='type_transfer']").attr('class', 'btn btn-sm btn-outline-primary'); - $("label[for='type_credit']").attr('class', 'btn btn-sm btn-outline-primary'); - $("label[for='type_debit']").attr('class', 'btn btn-sm btn-outline-primary'); if (location.hash) $("#type_" + location.hash.substr(1)).click(); -- GitLab