Warn about required metadata
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 8 Jul 2022 14:28:21 +0000 (16:28 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 8 Jul 2022 14:28:21 +0000 (16:28 +0200)
src/redakcja/static/js/wiki/view_properties.js

index eeddf67..7e284a5 100644 (file)
                 field,
                 this);
         });
+
+        count = $('.c > .input-group', $fg).length;
+        if (field.required) {
+            if (!count) {
+                $('<div class="text-warning">WYMAGANE</div>').appendTo($('.c', $fg));
+            }
+        }
     };