diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 93fffa20..ccc47d42 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -294,7 +294,7 @@ </div> <!-- Configure --> - <div class="request-section" id="request"> +<!-- <div class="request-section" id="request"> <div class="container"> <div class="row"> <div class="col-sm-6 col-md-6"> @@ -303,14 +303,14 @@ </div> </div> <div class="col-sm-6 col-md-6"> - <!-- Beta access form, will be loaded via ajax --> + <!-- Beta access form, will be loaded via ajax <div class="form" id="beta_access_form"> </div> </div> </div> </div> - </div> + </div> --> <!-- /.content-section-a --> <!-- / contact section --> <div class="full-contact-section"> @@ -365,20 +365,20 @@ </li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#about">{% trans "What is it" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#how">{% trans "What is it" %}</a></li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#about">{% trans "Scale out" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#your">{% trans "Scale out" %}</a></li> <li>⋅</li> <li> - <a href="#about">{% trans "Reliable and light" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#our">{% trans "Reliable and light" %}</a></li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#services">{% trans "Pricing" %}</a> + <a href="{% url 'datacenterlight:index' %}#price">{% trans "Pricing" %}</a> </li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#contact">{% trans "Contact" %}</a> + <a href="{% url 'datacenterlight:index' %}#contact">{% trans "Contact" %}</a> </li> </ul> <p class="copyright text-muted small">Copyright © ungleich GmbH {% now "Y" %}. All Rights Reserved</p> diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index 9b217d10..54c7f950 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -195,24 +195,24 @@ <div class="col-lg-12"> <ul class="list-inline"> <li> - <a href="#">{% trans "Home" %}</a> + <a href="{% url 'datacenterlight:index' %}">{% trans "Home" %}</a> </li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#about">{% trans "What is it" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#how">{% trans "What is it" %}</a></li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#about">{% trans "Scale out" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#your">{% trans "Scale out" %}</a></li> <li>⋅</li> <li> - <a href="#about">{% trans "Reliable and light" %}</a></li> + <a href="{% url 'datacenterlight:index' %}#our">{% trans "Reliable and light" %}</a></li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#services">{% trans "Pricing" %}</a> + <a href="{% url 'datacenterlight:index' %}#price">{% trans "Pricing" %}</a> </li> <li class="footer-menu-divider">⋅</li> <li> - <a href="#contact">{% trans "Contact" %}</a> + <a href="{% url 'datacenterlight:index' %}#contact">{% trans "Contact" %}</a> </li> </ul> <p class="copyright text-muted small">Copyright © ungleich GmbH {% now "Y" %}. All Rights Reserved</p> diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d7b6a3e5..3c8741eb 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -158,6 +158,7 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', 'to': form.cleaned_data.get('email'), + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_confirmation', 'template_path': 'datacenterlight/emails/' @@ -171,7 +172,8 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', - 'to': 'info@ungleich.ch', + 'to': 'support@datacenterlight.ch', + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_notification', 'template_path': 'datacenterlight/emails/' @@ -261,6 +263,7 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', 'to': form.cleaned_data.get('email'), + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_confirmation', 'template_path': 'datacenterlight/emails/' @@ -274,7 +277,8 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', - 'to': 'info@ungleich.ch', + 'to': 'support@datacenterlight.ch', + 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'context': context, 'template_name': 'request_access_notification', 'template_path': 'datacenterlight/emails/' diff --git a/hosting/templates/hosting/reset_password.html b/hosting/templates/hosting/reset_password.html index 1590a5bd..33aad944 100644 --- a/hosting/templates/hosting/reset_password.html +++ b/hosting/templates/hosting/reset_password.html @@ -10,6 +10,16 @@ <h2>{% trans "Your VM hosted in Switzerland"%}</h2> </div> <div class="auth-content"> + + {% if messages %} + <ul class="list-unstyled" style="color: #fff"> + {% for message in messages %} + <li>{{ message }}</li> + {% endfor %} + </ul> + {% endif %} + + <div class="intro-message auth-box sign-up"> <h2 class="section-heading">{% trans "Reset your password"%}</h2> <form action="{% url 'hosting:reset_password' %}" method="post" class="form" novalidate> diff --git a/hosting/views.py b/hosting/views.py index 7e15ac2a..d99342e2 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -298,7 +298,7 @@ class SSHKeyDeleteView(LoginRequiredMixin, DeleteView): manager = OpenNebulaManager() pk = self.kwargs.get('pk') # Get user ssh key - public_key = UserHostingKey.objects.get(pk=pk) + public_key = UserHostingKey.objects.get(pk=pk).public_key # Add ssh key to user try: manager.remove_public_key(user=owner, public_key=public_key) diff --git a/utils/mailer.py b/utils/mailer.py index 948cdd68..b2a06a6c 100644 --- a/utils/mailer.py +++ b/utils/mailer.py @@ -21,7 +21,10 @@ class BaseEmail(object): self.email = EmailMultiAlternatives(self.subject, text_content) self.email.attach_alternative(html_content, "text/html") - self.email.from_email = '(ungleich) ungleich Support <info@ungleich.ch>' + self.email.from_email = kwargs.get( + 'from', + '(ungleich) ungleich Support <info@ungleich.ch>' + ) self.email.to = [kwargs.get('to', 'info@ungleich.com')] def send(self): diff --git a/utils/views.py b/utils/views.py index b547506f..8dbd17e7 100644 --- a/utils/views.py +++ b/utils/views.py @@ -65,7 +65,7 @@ class LoginViewMixin(FormView): class PasswordResetViewMixin(FormView): # template_name = 'hosting/reset_password.html' # form_class = PasswordResetRequestForm - success_message = "The link to reset your email has been sent to your email" + success_message = "Thank you! You will shortly receive a password reset mail from us" # success_url = reverse_lazy('hosting:login') def test_generate_email_context(self, user):