Skip to content

Commit

Permalink
Simplifies adding a bill with keyboard only
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo144 committed Aug 28, 2023
1 parent 04c375e commit 32da7bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ihatemoney/templates/list_bills.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
{% block js %}
{% if add_bill %} $('#new-bill > a').click(); {% endif %}

// focus on first field when adding a bill
$("#bill-form").on('shown.bs.modal', function(){
$(this).find('#date').focus();
});

// ask for confirmation before removing an user
$('.action.delete').each(function(){
var link = $(this).find('button');
Expand Down Expand Up @@ -101,7 +106,7 @@ <h3 class="modal-title">{{ _('Add a bill') }}</h3>
</ul>
{% endif %}
<span id="new-bill" class="ml-auto pb-2" {% if not g.project.members %} data-toggle="tooltip" title="{{_('You should start by adding participants')}}" {% endif %}>
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="false" data-target="#bill-form">
<a href="{{ url_for('.add_bill') }}" class="btn btn-primary {% if not g.project.members %} disabled {% endif %}" data-toggle="modal" data-keyboard="true" data-target="#bill-form" autofocus>
<i class="icon icon-white before-text">{{ static_include("images/plus.svg") | safe }}</i>
{{ _("Add a new bill") }}
</a>
Expand Down

0 comments on commit 32da7bd

Please sign in to comment.