mirror of
https://github.com/9001/copyparty.git
synced 2026-01-12 07:44:08 -07:00
new-file: warn on missing required .md$
This commit is contained in:
parent
65391a9d8c
commit
2f3591d036
|
|
@ -8686,13 +8686,17 @@ var msel = (function () {
|
|||
tb = QS('#op_new_md input[name="name"]');
|
||||
|
||||
form.onsubmit = function (e) {
|
||||
if (!has(perms, "delete") && !/\.md$/.test(tb.value)) {
|
||||
ev(e);
|
||||
toast.err(10, L.nmd_i2);
|
||||
return false;
|
||||
}
|
||||
if (tb.value) {
|
||||
if (toast.tag == L.mk_noname)
|
||||
toast.hide();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ev(e);
|
||||
toast.err(10, L.mk_noname, L.mk_noname);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue