bepasty: New app for file upload and sharing

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Joseph Nuthalapati committed 2020-08-21 21:50:38 +05:30
1 parent 66537b1f9c
commit 7edc2f4e13
17 files changed
+738

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Django forms for bepasty app.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from plinth.modules import bepasty
class AddPasswordForm(forms.Form):
"""Form to add a new password."""
permissions = forms.MultipleChoiceField(
choices=bepasty.PERMISSIONS.items(),
widget=forms.CheckboxSelectMultiple, required=False,
label=_('Permissions'), help_text=_(
'Users that log in with this password will have the selected '
'permissions.'))
comment = forms.CharField(
label=_('Comment'), required=False, strip=True, help_text=_(
'Any comment to help you remember the purpose of this password.'))