You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/09/28 19:08:59 UTC

allura git commit: Add validation for screenshot file input

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 <sh...@gmail.com>
Authored: Wed Sep 26 14:31:29 2018 +0530
Committer: Dave Brondsema <db...@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',