diff --git a/hosting/forms.py b/hosting/forms.py index 505ecbce..b48a52ef 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -58,15 +58,19 @@ class HostingUserSignupForm(forms.ModelForm): class UserHostingKeyForm(forms.ModelForm): private_key = forms.CharField(widget=forms.HiddenInput(), required=False) - public_key = forms.CharField(widget=forms.Textarea(), required=False, - help_text=_('Paste here your public key')) + public_key = forms.CharField(widget=forms.Textarea( + attrs={'class': 'form_public_key', 'placeholder': 'Paste here your public key'}), + required=False, + ) user = forms.models.ModelChoiceField(queryset=CustomUser.objects.all(), required=False, widget=forms.HiddenInput()) - name = forms.CharField(required=True) + name = forms.CharField(required=True, widget=forms.TextInput( + attrs={'class': 'form_key_name', 'placeholder': 'Give a name to your key',})) def __init__(self, *args, **kwargs): self.request = kwargs.pop("request") super(UserHostingKeyForm, self).__init__(*args, **kwargs) + self.fields['name'].label = "Key name" def clean_name(self): return self.data.get('name') diff --git a/hosting/static/hosting/css/user_keys.css b/hosting/static/hosting/css/user_keys.css index 973b45fb..416b9e44 100644 --- a/hosting/static/hosting/css/user_keys.css +++ b/hosting/static/hosting/css/user_keys.css @@ -91,4 +91,145 @@ padding-left: 0; padding-right: 0; } -} \ No newline at end of file +} +.choice-container{ + margin-top: 30px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; +} +.choice-container div:first-of-type{ + border-right: 1px solid #c9c6c6; +} + +.choice-container div{ + padding-top: 30px; + padding-bottom: 30px; + display: flex; + align-items: center; + flex-direction: column; + width: 50%; +} +.choice-container div h3{ + margin: auto; + width: 95%; + text-align: center; +} +.choice-container div h3 img:hover{ + cursor: pointer; +} +.dashboard-container { + max-width: 930px !important; + } +.choice-button{ + width: 192px; + height: 45px; + border-radius: 0; + color: white; + margin-top: 70px; +} +.choice-button a{ + color: white; + font-size: 20px; +} +.upload-btn{ + background-color: #337ab7; +} +.form_public_key, +.form_key_name{ + border:none; + border-bottom: 1px solid grey; + box-shadow: none; + border-radius: 0; + font-family: 'Lato-Light', sans-serif; + font-size: 20px; +} + +.form_key_name::-webkit-input-placeholder{ + position: relative; + left:-10px; + font-size: 20px; + font-weight:100; + font-family: 'Lato-Light', sans-serif; + + +} +.form_key_name::-moz-input-placeholder{ + left:-10px; + font-size: 20px; + font-weight:200; + font-family: 'Lato-Light', sans-serif; + +} +.form_key_name:-moz-input-placeholder{ + left:-10px; + font-family: 'Lato-Light', sans-serif; + font-size: 20px; + font-weight:200; + +} +.form_key_name:-ms-input-placeholder { + left:-10px; + font-size: 20px; + font-family: 'Lato-Light', sans-serif; + font-weight:200; +} + +.form_public_key::-webkit-input-placeholder{ + position: relative; + top: 80%; + left:-10px; + font-size: 20px; + font-weight:200; + font-family: 'Lato-Light', sans-serif; + +} +.form_public_key::-moz-input-placeholder{ + position: relative; + top: 80%; + left:-10px; + font-size: 20px; + font-family: 'Lato-Light', sans-serif; + font-weight:200; + +} +.form_public_key:-moz-input-placeholder{ + position: relative; + top: 80%; + left:-10px; + font-size: 20px; + font-weight:200; + font-family: 'Lato-Light', sans-serif; +} +.form_public_key:-ms-input-placeholder { + position: relative; + top: 80%; + left:-10px; + font-size: 20px; + font-weight:200; + font-family: 'Lato-Light', sans-serif; +} +.underform-contaner{ + display: flex; + vertical-align: middle; + align-items: center; + justify-content: space-between; + flex-direction: row; + margin-bottom: 20px; +} +.underform-contaner h4{ + font-family: 'Lato-Light', sans-serif; +} +.underform-contaner button{ + width: 120px; + height: 35px; +} +.control-label{ + font-family: 'Lato-Light', sans-serif; + font-size: 20px; + font-weight:200; +} +.form-ssh h3{ + margin-bottom: 40px; +} diff --git a/hosting/templates/hosting/choice_ssh_keys.html b/hosting/templates/hosting/choice_ssh_keys.html new file mode 100644 index 00000000..7da48342 --- /dev/null +++ b/hosting/templates/hosting/choice_ssh_keys.html @@ -0,0 +1,70 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 i18n %} +{% block content %} +