material: disable editing of entry url input when submitting new url

Fixes #1871

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2017-11-01 12:32:14 +01:00
parent b0f9e52b7e
commit 3d46eeeb33
2 changed files with 10 additions and 0 deletions

View file

@ -95,6 +95,11 @@ nav {
display: flex;
flex: 1;
}
&.nav-panel-add form.disabled,
&.nav-panel-add form.disabled input {
background-color: whitesmoke;
}
}
#button_filters {

View file

@ -50,6 +50,11 @@ $(document).ready(() => {
$('#entry_url').focus();
return false;
});
const materialAddForm = $('.nav-panel-add form[name=entry]');
materialAddForm.on('submit', () => {
materialAddForm.addClass('disabled');
$('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
});
$('#nav-btn-search').on('click', () => {
$('.nav-panel-buttom').hide(100);
$('.nav-panel-search').show(100);