1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Support using enter to submit task form

This commit is contained in:
Hillel Coren 2017-11-05 14:46:27 +02:00
parent 490269ad63
commit e303691e96

View File

@ -41,7 +41,7 @@
{!! Former::text('time_log') !!}
</div>
<div class="row">
<div class="row" onkeypress="formEnterClick(event)">
<div class="col-md-12">
<div class="panel panel-default">
@ -490,6 +490,20 @@
}
}
function formEnterClick(event) {
if (event.keyCode === 13){
if (event.target.type == 'textarea') {
return;
}
event.preventDefault();
@if ($task && $task->trashed())
return;
@endif
submitAction('');
return false;
}
}
$(function() {
$('input[type=radio]').change(function() {
onTaskTypeChange();