Task #9534 Handle the UI of the Home Screen

This commit is contained in:
amalelshihaby 2021-07-26 16:11:19 +02:00
commit 20ce755303
48 changed files with 13944 additions and 262 deletions

View file

@ -15,15 +15,17 @@ class DomainNameField(forms.CharField):
def __init__(self, *args, **kwargs):
super(DomainNameField, self).__init__(*args, **kwargs)
class RequestHostedVMForm(forms.Form):
class InitialRequestForm(forms.Form):
cores = forms.IntegerField(label='CPU', min_value=1, max_value=48, initial=1)
memory = forms.IntegerField(label='RAM', min_value=2, max_value=200, initial=2)
storage = forms.IntegerField(label='Storage', min_value=100, max_value=10000, initial=100)
pricing_name = forms.CharField(required=True)
class RequestHostedVMForm(InitialRequestForm):
matrix_domain = DomainNameField(required=True)
homeserver_domain = DomainNameField(required=True)
webclient_domain = DomainNameField(required=True)
is_open_registration = forms.BooleanField(required=False, initial=False)
pricing_name = forms.CharField(required=True)
def clean(self):
homeserver_domain = self.cleaned_data.get('homeserver_domain', False)