mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Cleaned share related code
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
class RepoShareForm(forms.Form):
|
||||
"""
|
||||
@@ -8,3 +9,15 @@ class RepoShareForm(forms.Form):
|
||||
email_or_group = forms.CharField(max_length=512)
|
||||
repo_id = forms.CharField(max_length=36)
|
||||
permission = forms.ChoiceField(choices=(('rw', 'read-write'), ('r', 'read-only')))
|
||||
|
||||
class FileLinkShareForm(forms.Form):
|
||||
"""
|
||||
Form for sharing file shared link to emails.
|
||||
"""
|
||||
|
||||
email = forms.CharField(max_length=512, error_messages={
|
||||
'required': _("Email is required"),
|
||||
'max_length': _("Email is not longer than 512 characters"),
|
||||
})
|
||||
file_shared_link = forms.CharField()
|
||||
|
||||
|
Reference in New Issue
Block a user