2014-09-26 19:21:09 +00:00
|
|
|
from django import forms
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2014-11-09 10:16:07 +00:00
|
|
|
from rest_framework import serializers
|
2014-09-26 19:21:09 +00:00
|
|
|
|
2015-03-23 15:36:51 +00:00
|
|
|
from .. import settings
|
2015-09-21 10:28:49 +00:00
|
|
|
from ..forms import SaaSPasswordForm
|
|
|
|
from .options import SoftwareService
|
2014-09-26 19:21:09 +00:00
|
|
|
|
2014-09-28 12:28:57 +00:00
|
|
|
|
2015-09-21 10:28:49 +00:00
|
|
|
class BSCWForm(SaaSPasswordForm):
|
2014-11-20 15:34:59 +00:00
|
|
|
email = forms.EmailField(label=_("Email"), widget=forms.TextInput(attrs={'size':'40'}))
|
2014-11-09 10:16:07 +00:00
|
|
|
|
|
|
|
|
2014-11-20 15:34:59 +00:00
|
|
|
class BSCWDataSerializer(serializers.Serializer):
|
2014-11-09 10:16:07 +00:00
|
|
|
email = serializers.EmailField(label=_("Email"))
|
2014-09-26 19:21:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BSCWService(SoftwareService):
|
2015-03-23 15:36:51 +00:00
|
|
|
name = 'bscw'
|
2014-09-26 19:21:09 +00:00
|
|
|
verbose_name = "BSCW"
|
|
|
|
form = BSCWForm
|
2014-11-20 15:34:59 +00:00
|
|
|
serializer = BSCWDataSerializer
|
2015-03-04 21:06:16 +00:00
|
|
|
icon = 'orchestra/icons/apps/BSCW.png'
|
2015-03-25 15:45:04 +00:00
|
|
|
site_domain = settings.SAAS_BSCW_DOMAIN
|
2014-11-20 15:34:59 +00:00
|
|
|
change_readonly_fileds = ('email',)
|