From e7472ff91b3f448c94b387f199de48ed3fc09bca Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 03 2015 14:36:09 +0000 Subject: Add a form with the minimal information required for online editing --- diff --git a/pagure/forms.py b/pagure/forms.py index 2d4b2d6..98825ba 100644 --- a/pagure/forms.py +++ b/pagure/forms.py @@ -264,3 +264,13 @@ class NewGroupForm(wtf.Form): self.group_type.choices = [ (grptype, grptype) for grptype in kwargs['group_types'] ] + + +class EditFileForm(wtf.Form): + """ Form used to edit a file. """ + content = wtforms.TextAreaField( + 'content', [wtforms.validators.Required()]) + commit_title = wtforms.TextField( + 'Title', [wtforms.validators.Required()]) + commit_message = wtforms.TextAreaField( + 'Commit message', [wtforms.validators.optional()])