Fix the result asset cancel behavior when clicking enter [SCI-7670]

This commit is contained in:
sboursen-scinote 2023-03-16 14:19:24 +01:00
parent 4f55bd75f9
commit 0526bfaae1
3 changed files with 16 additions and 7 deletions

View file

@ -176,7 +176,7 @@
}
function enableSubmitButton() {
$('.save-result').prop('disabled', false);
$('.save-result').prop('disabled', false).focus();
}
function filerAndCheckFiles() {

View file

@ -50,6 +50,14 @@
}
}
.well {
.align-right {
column-gap: 8px;
display: flex;
flex-direction: row-reverse;
}
}
.result {
.panel {
margin-left: 4.25em !important;

View file

@ -19,14 +19,15 @@
</div>
<br />
<div class="align-right">
<%= f.button t('result_assets.new.create'),
class: 'btn btn-primary save-result',
onclick: 'DragNDropResults.processResult(event);',
data: { href: my_module_result_assets_path(page: params[:page], order: params[:order], format: :json) } %>
<%= f.button t('general.cancel'),
class: 'btn btn-secondary cancel-new',
onclick: 'DragNDropResults.destroyAll();' %>
<%= f.button t('result_assets.new.create'),
class: 'btn btn-primary save-result',
onclick: 'DragNDropResults.processResult(event);',
disabled: true,
data: { href: my_module_result_assets_path(page: params[:page], order: params[:order], format: :json) } %>
onclick: 'DragNDropResults.destroyAll();',
type: 'button '%>
</div>
<% end %>
</div>