allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject allura git commit: Add validation for screenshot file input
Date Fri, 28 Sep 2018 19:08:59 GMT
Repository: allura
Updated Branches:
  refs/heads/master bfad59190 -> ae071edd8


Add validation for screenshot file input


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ae071edd
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ae071edd
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ae071edd

Branch: refs/heads/master
Commit: ae071edd8cb8d950c78f0d06b46ebd0505fc8338
Parents: bfad591
Author: Shalitha Suranga <shalithasuranga@gmail.com>
Authored: Wed Sep 26 14:31:29 2018 +0530
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Sep 28 19:07:49 2018 +0000

----------------------------------------------------------------------
 Allura/allura/ext/admin/widgets.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/ae071edd/Allura/allura/ext/admin/widgets.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/widgets.py b/Allura/allura/ext/admin/widgets.py
index dd10429..8f3513d 100644
--- a/Allura/allura/ext/admin/widgets.py
+++ b/Allura/allura/ext/admin/widgets.py
@@ -149,7 +149,11 @@ class ScreenshotAdmin(ff.ForgeForm):
     def fields(self):
         fields = [
             ew.InputField(name='screenshot', field_type='file',
-                          label='New Screenshot', attrs={'accept': 'image/*'}),
+                          label='New Screenshot', 
+                          attrs={
+                              'accept': 'image/*',
+                              'required': 'true',
+                              }),
             ew.InputField(name='caption',
                           field_type="text",
                           label='Caption',


Mime
View raw message