Simplifies adding a bill with keyboard only

This commit is contained in:
Jojo144 2023-08-28 23:20:34 +02:00
parent 04c375e2e7
commit 6cc4853d4f

View file

@ -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('#what').focus();
});
// ask for confirmation before removing an user
$('.action.delete').each(function(){
var link = $(this).find('button');
@ -101,7 +106,7 @@
</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>