Fix ISBN script
This commit is contained in:
parent
bb7109ff7c
commit
e885e82acd
1 changed files with 10 additions and 8 deletions
|
@ -63,6 +63,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
|
|
||||||
var editorValue = "";
|
var editorValue = "";
|
||||||
var editorIsOther = false;
|
var editorIsOther = false;
|
||||||
|
if (data.editor) {
|
||||||
for (var option of document.querySelector('#id_editor').children) {
|
for (var option of document.querySelector('#id_editor').children) {
|
||||||
if (editorValue === "" && option.firstChild.data.toLowerCase().indexOf('autre') !== -1) {
|
if (editorValue === "" && option.firstChild.data.toLowerCase().indexOf('autre') !== -1) {
|
||||||
editorValue = option.value;
|
editorValue = option.value;
|
||||||
|
@ -73,6 +74,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
editorIsOther = false;
|
editorIsOther = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
editor.value = editorValue;
|
editor.value = editorValue;
|
||||||
editor.classList.add('is-valid');
|
editor.classList.add('is-valid');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue