diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 15:17:51 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | 4ba4951e530cbdfb6fa7bee811456208a83ce1dd (patch) | |
tree | a336f1bd979da47864b3899ea340378015e72dd6 /editor/actions/import.ml | |
parent | 179720a7f2c790ea5557bb5caabe22a926b3e106 (diff) |
In popup, added a predicate to validate the form
Diffstat (limited to 'editor/actions/import.ml')
-rwxr-xr-x | editor/actions/import.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/actions/import.ml b/editor/actions/import.ml index 4cac76c..13ed938 100755 --- a/editor/actions/import.ml +++ b/editor/actions/import.ml @@ -44,9 +44,14 @@ end let create () = let title = Jstr.v "Importer des notes" in + let form = Forms.Selector.create () in let ev = Elements.Popup.create ~title - ~form:(Some (Forms.Selector.create ())) in + ~form + ~valid_on:(Note.S.map (fun form -> form.Forms.Selector.file != None) (fst form)) + () + in + Note.E.map (fun v -> State.E ( v |