X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3c5fe5b298287f92a9c6a8e485c3860db36931fd..80a2c67a898b06c9c28bda89d7aa012676c2a23a:/apps/api/forms.py diff --git a/apps/api/forms.py b/apps/api/forms.py index 7c6f2c22..3c393a87 100644 --- a/apps/api/forms.py +++ b/apps/api/forms.py @@ -7,8 +7,16 @@ __doc__ = "Micro-forms for the API." from django import forms -class DocumentEntryRequest(forms.Form): - revision = forms.RegexField(regex='latest|[0-9a-f]{40}') + +class MergeRequestForm(forms.Form): + # should the target document revision be updated or shared + type = forms.ChoiceField(choices=('update', 'share')) + + # which revision to update/share + target_revision = forms.RegexField('[0-9a-f]{40}') + + # any additional comments that user wants to add to the change + comment = forms.CharField(required=False) class DocumentUploadForm(forms.Form): ocr_file = forms.FileField(label='Source OCR file', required=False)