diff --git a/apps/accounts/admin.py b/apps/accounts/admin.py index 36c365e36c..6432fe4b92 100644 --- a/apps/accounts/admin.py +++ b/apps/accounts/admin.py @@ -1,14 +1,15 @@ from django.contrib import admin -from .models import DetailKey, Profile +from .models import AdditionalField, AdditionalFieldValue -class DetailKeyAdmin(admin.ModelAdmin): +class AdditionalFieldAdmin(admin.ModelAdmin): pass -class ProfileAdmin(admin.ModelAdmin): - readonly_fields = ('user', ) +class AdditionalFieldValueAdmin(admin.ModelAdmin): + pass + -admin.site.register(DetailKey, DetailKeyAdmin) -admin.site.register(Profile, ProfileAdmin) +admin.site.register(AdditionalField, AdditionalFieldAdmin) +admin.site.register(AdditionalFieldValue, AdditionalFieldValueAdmin) diff --git a/apps/accounts/forms.py b/apps/accounts/forms.py index 94e4e56f50..76d8d174b5 100644 --- a/apps/accounts/forms.py +++ b/apps/accounts/forms.py @@ -1,42 +1,63 @@ from django import forms from django.contrib.auth.models import User +from django.utils.translation import ugettext_lazy as _ +from .models import AdditionalField, AdditionalFieldValue + + +class ProfileForm(forms.ModelForm): -class UserForm(forms.ModelForm): class Meta: model = User - fields = ('first_name', 'last_name', 'email') + fields = ('first_name', 'last_name') - -class ProfileForm(forms.Form): def __init__(self, *args, **kwargs): - profile = kwargs.pop('profile') - detail_keys = kwargs.pop('detail_keys') - super(ProfileForm, self).__init__(*args, **kwargs) + self.fields['first_name'].widget = forms.TextInput(attrs={'placeholder': _('First name')}) + self.fields['last_name'].widget = forms.TextInput(attrs={'placeholder': _('Last name')}) + + self.additional_fields = AdditionalField.objects.all() + self.additional_values = self.instance.additional_values.all() + # add fields and init values for the Profile model - for detail_key in detail_keys: - if detail_key.type == 'text': - field = forms.CharField() - elif detail_key.type == 'textarea': - field = forms.CharField(widget=forms.Textarea) - elif detail_key.type == 'select': - field = forms.ChoiceField(choices=detail_key.options) - elif detail_key.type == 'radio': - field = forms.ChoiceField(choices=detail_key.options, widget=forms.RadioSelect) - elif detail_key.type == 'multiselect': - field = forms.MultipleChoiceField(choices=detail_key.options) - elif detail_key.type == 'checkbox': - field = forms.MultipleChoiceField(choices=detail_key.options, widget=forms.CheckboxSelectMultiple) + for additional_field in self.additional_fields: + + if additional_field.type == 'text': + field = forms.CharField(widget=forms.TextInput(attrs={'placeholder': additional_field.text})) + elif additional_field.type == 'textarea': + field = forms.CharField(widget=forms.Textarea(attrs={'placeholder': additional_field.text})) else: - raise Exception('Unknown detail key type.') + raise Exception('Unknown additional_field type.') + + field.label = additional_field.text + field.help = additional_field.help + field.required = additional_field.required + + self.fields[additional_field.key] = field + + for additional_field_value in self.additional_values: + self.fields[additional_field.key].initial = additional_field_value.value + + def save(self, *args, **kwargs): + super(ProfileForm, self).save(*args, **kwargs) + self._save_additional_values() + + def _save_additional_values(self, user=None): + if user is None: + user = self.instance + + for additional_field in self.additional_fields: + try: + additional_value = user.additional_values.get(field=additional_field) + except AdditionalFieldValue.DoesNotExist: + additional_value = AdditionalFieldValue(user=user, field=additional_field) + + additional_value.value = self.cleaned_data[additional_field.key] + additional_value.save() + - field.label = detail_key.label - field.required = detail_key.required - field.help_text = detail_key.help_text - self.fields[detail_key.key] = field +class SignupForm(ProfileForm): - # add an initial value, if one is found in the user details - if profile.details and detail_key.key in profile.details: - self.fields[detail_key.key].initial = profile.details[detail_key.key] + def signup(self, request, user): + self._save_additional_values(user) diff --git a/apps/accounts/migrations/0007_additional_fields.py b/apps/accounts/migrations/0007_additional_fields.py new file mode 100644 index 0000000000..8faf7bf2eb --- /dev/null +++ b/apps/accounts/migrations/0007_additional_fields.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2016-11-14 12:13 +from __future__ import unicode_literals + +import apps.core.models +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('accounts', '0006_permissions_removed'), + ] + + operations = [ + migrations.CreateModel( + name='AdditionalField', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('key', models.SlugField()), + ('type', models.CharField(choices=[('text', 'Text'), ('textarea', 'Textarea')], max_length=11)), + ('text_en', models.CharField(max_length=256)), + ('text_de', models.CharField(max_length=256)), + ('help_en', models.TextField(blank=True, help_text='Enter a help text to be displayed next to the input element', null=True)), + ('help_de', models.TextField(blank=True, help_text='Enter a help text to be displayed next to the input element', null=True)), + ('required', models.BooleanField()), + ], + options={ + 'ordering': ('key',), + 'verbose_name': 'Additional field', + 'verbose_name_plural': 'Additional fields', + }, + bases=(models.Model, apps.core.models.TranslationMixin), + ), + migrations.CreateModel( + name='AdditionalFieldValue', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('value', models.CharField(max_length=256)), + ('field', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='accounts.AdditionalField')), + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='additional_fields', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ('user', 'field'), + 'verbose_name': 'Additional field value', + 'verbose_name_plural': 'Additional field values', + }, + ), + migrations.DeleteModel( + name='DetailKey', + ), + migrations.RemoveField( + model_name='profile', + name='user', + ), + migrations.DeleteModel( + name='Profile', + ), + ] diff --git a/apps/accounts/migrations/0008_related_name.py b/apps/accounts/migrations/0008_related_name.py new file mode 100644 index 0000000000..071f442392 --- /dev/null +++ b/apps/accounts/migrations/0008_related_name.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9 on 2016-11-15 14:51 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0007_additional_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='additionalfieldvalue', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='additional_values', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/apps/accounts/models.py b/apps/accounts/models.py index 303852d39d..da6b59f6a4 100644 --- a/apps/accounts/models.py +++ b/apps/accounts/models.py @@ -1,79 +1,62 @@ from __future__ import unicode_literals from django.db import models -from django.db.models.signals import post_save from django.contrib.auth.models import User from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ -from jsonfield import JSONField +from apps.core.models import TranslationMixin @python_2_unicode_compatible -class Profile(models.Model): - user = models.OneToOneField(User) - details = JSONField(null=True, blank=True) - - class Meta: - ordering = ('user',) - - verbose_name = _('Profile') - verbose_name_plural = _('Profiles') - - def __str__(self): - return self.user.username - - @property - def full_name(self): - if self.user.first_name and self.user.last_name: - return '%s %s' % (self.user.first_name, self.user.last_name) - else: - return self.user.username - - def as_dl(self): - html = '
{% trans 'The following e-mail addresses are associated with your account:' %}
+ + + +{% else %} + ++ {% trans 'Warning:'%} {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %} +
+ +{% endif %} + ++ {% blocktrans trimmed with confirmation.email_address.email as email %} + Please confirm that {{ email }} is an e-mail address for user {{ user_display }}. + {% endblocktrans %} +
+ + + + {% else %} + + {% url 'account_email' as email_url %} + ++ {% blocktrans trimmed %} + This e-mail confirmation link expired or is invalid. Please issue a new e-mail confirmation request. + {% endblocktrans %} +
+ + {% endif %} + +{% endblock %} \ No newline at end of file diff --git a/apps/accounts/templates/account/login.html b/apps/accounts/templates/account/login.html new file mode 100644 index 0000000000..66d4fcadec --- /dev/null +++ b/apps/accounts/templates/account/login.html @@ -0,0 +1,13 @@ +{% extends 'core/page.html' %} +{% load i18n %} +{% load account %} +{% load socialaccount %} +{% load core_tags %} + +{% block page %} + ++ {% url 'account_reset_password' as reset_url %} + {% blocktrans %}If you have not created an account yet, then please sign up first.{% endblocktrans %} +
+ ++ {% url 'account_reset_password' as reset_url %} + {% blocktrans %}If you forgot your password and want to reset it, click here.{% endblocktrans %} +
+ +{% if socialaccount_providers %} + ++ {% blocktrans with site.name as site_name %}Alternatively, you can login using one of the following third party accounts:{% endblocktrans %} +
+ + + +{% include "socialaccount/snippets/login_extra.html" %} + +{% endif %} diff --git a/apps/accounts/templates/account/logout.html b/apps/accounts/templates/account/logout.html new file mode 100644 index 0000000000..eb5e68255f --- /dev/null +++ b/apps/accounts/templates/account/logout.html @@ -0,0 +1,22 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% trans 'Are you sure you want to sign out?' %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/account/password_change.html b/apps/accounts/templates/account/password_change.html new file mode 100644 index 0000000000..847052f859 --- /dev/null +++ b/apps/accounts/templates/account/password_change.html @@ -0,0 +1,20 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% trans "Please enter your old password, and then enter your new password twice so we can verify you typed it in correctly." %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/account/password_reset.html b/apps/accounts/templates/account/password_reset.html new file mode 100644 index 0000000000..09a76bd93f --- /dev/null +++ b/apps/accounts/templates/account/password_reset.html @@ -0,0 +1,24 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/account/password_reset_done.html b/apps/accounts/templates/account/password_reset_done.html new file mode 100644 index 0000000000..c0b9a3246e --- /dev/null +++ b/apps/accounts/templates/account/password_reset_done.html @@ -0,0 +1,24 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% blocktrans trimmed %} + We have sent you an e-mail. Please contact us if you do not receive it within a few minutes. + {% endblocktrans %} +
+ ++ {% blocktrans trimmed %} + If you don't receive an e-mail, please make sure you've entered the address you registered with, and check your spam folder. + {% endblocktrans %} +
+ +{% endblock %} diff --git a/apps/accounts/templates/account/password_reset_from_key.html b/apps/accounts/templates/account/password_reset_from_key.html new file mode 100644 index 0000000000..8bddbe38d0 --- /dev/null +++ b/apps/accounts/templates/account/password_reset_from_key.html @@ -0,0 +1,40 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + +{% if token_fail %} + ++ {% url 'account_reset_password' as passwd_reset_url %} + {% blocktrans trimmed %}The password reset link was invalid, possibly because it has already been used. + Please request a new password reset.{% endblocktrans %} +
+ +{% else %} + ++ {% trans 'Your password is now changed.' %} +
+ + {% endif %} + +{% endif %} + +{% endblock %} diff --git a/apps/accounts/templates/account/password_reset_from_key_done.html b/apps/accounts/templates/account/password_reset_from_key_done.html new file mode 100644 index 0000000000..1a91b201f3 --- /dev/null +++ b/apps/accounts/templates/account/password_reset_from_key_done.html @@ -0,0 +1,17 @@ +{% extends 'core/page.html' %} +{% load i18n %} +{% load core_tags %} + +{% block page %} + ++ {% trans "Your password has been set. You may go ahead and log in now." %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/account/password_set.html b/apps/accounts/templates/account/password_set.html new file mode 100644 index 0000000000..d5f324c0df --- /dev/null +++ b/apps/accounts/templates/account/password_set.html @@ -0,0 +1,20 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% trans "Please enter your new password twice so we can verify you typed it in correctly." %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/account/signup.html b/apps/accounts/templates/account/signup.html new file mode 100644 index 0000000000..4b5c191bbc --- /dev/null +++ b/apps/accounts/templates/account/signup.html @@ -0,0 +1,32 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% blocktrans trimmed %} + Already have an account? Then please sign in. + {% endblocktrans %} +
+ + + ++ {% trans "We are sorry, but the sign up is currently closed." %} +
+ +{% endblock %} diff --git a/apps/accounts/templates/account/verification_sent.html b/apps/accounts/templates/account/verification_sent.html new file mode 100644 index 0000000000..404aa95516 --- /dev/null +++ b/apps/accounts/templates/account/verification_sent.html @@ -0,0 +1,14 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %} +
+ +{% endblock %} diff --git a/apps/accounts/templates/account/verified_email_required.html b/apps/accounts/templates/account/verified_email_required.html new file mode 100644 index 0000000000..c065ec1ab6 --- /dev/null +++ b/apps/accounts/templates/account/verified_email_required.html @@ -0,0 +1,22 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block content %} + ++ {% blocktrans %}This part of the site requires us to verify that you are who you claim to be. For this purpose, we require that you verify ownership of your e-mail address. {% endblocktrans %} +
+ ++ {% blocktrans %}We have sent an e-mail to you for verification. Please click on the link inside this e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %} +
+ ++ {% blocktrans %}Note: you can still change your e-mail address.{% endblocktrans %} +
+ +{% endblock %} diff --git a/apps/accounts/templates/accounts/login.html b/apps/accounts/templates/accounts/login.html deleted file mode 100644 index b16ccb7155..0000000000 --- a/apps/accounts/templates/accounts/login.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Your login was not successful. Maybe you missed a field or your username and password didn't match. Please try again." %} -
- {% endif %} - -- {% internal_link _('Help, I forgot my password') 'password_reset' %} -
- -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_change_done.html b/apps/accounts/templates/accounts/password_change_done.html deleted file mode 100644 index d46c4ebf82..0000000000 --- a/apps/accounts/templates/accounts/password_change_done.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Your password has been changed. From now on, you can use the new password to login." %} -
- -- {% internal_link 'Home' 'home' %} -
- -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_change_form.html b/apps/accounts/templates/accounts/password_change_form.html deleted file mode 100644 index 6178a44a1f..0000000000 --- a/apps/accounts/templates/accounts/password_change_form.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Please enter your old password, and then enter your new password twice so we can verify you typed it in correctly." %} -
- - {% bootstrap_form submit=_('Change my password') %} - -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_reset_complete.html b/apps/accounts/templates/accounts/password_reset_complete.html deleted file mode 100644 index d10580fe18..0000000000 --- a/apps/accounts/templates/accounts/password_reset_complete.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans 'Your password has been set. You may go ahead and log in now.' %} -
- -- {% internal_link 'Login' 'login' %} -
- -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_reset_confirm.html b/apps/accounts/templates/accounts/password_reset_confirm.html deleted file mode 100644 index d7bf457a8c..0000000000 --- a/apps/accounts/templates/accounts/password_reset_confirm.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Please enter your new password twice so we can verify you typed it in correctly." %} -
- - {% bootstrap_form submit=_('Change my password') %} - -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_reset_done.html b/apps/accounts/templates/accounts/password_reset_done.html deleted file mode 100644 index ba6e3da204..0000000000 --- a/apps/accounts/templates/accounts/password_reset_done.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} - -{% block page %} - -- {% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %} -
- -- {% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %} -
- -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_reset_email.txt b/apps/accounts/templates/accounts/password_reset_email.txt deleted file mode 100644 index e0f4e660d0..0000000000 --- a/apps/accounts/templates/accounts/password_reset_email.txt +++ /dev/null @@ -1,25 +0,0 @@ -{% load i18n core_tags %}{% trans "Dear" %} {{ user.profile.full_name }}, - -{% blocktrans trimmed %} -You are receiving this email because you requested that your password be reset -on {{ domain }}. -{% endblocktrans %} - -{% blocktrans trimmed %} -If you do not wish to reset your password, please ignore -this message. -{% endblocktrans %} - -{% blocktrans trimmed %} -To reset your password, please click the following link, or copy and paste it -into your web browser: -{% endblocktrans %} - - {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uid token %} - -{% blocktrans trimmed with user.username as username %} -In case you've forgotten, your username is "{{ username }}". -{% endblocktrans %} - -{% trans "Sincerely" %}, - {{ site_name }} Admins diff --git a/apps/accounts/templates/accounts/password_reset_form.html b/apps/accounts/templates/accounts/password_reset_form.html deleted file mode 100644 index 3f39c62555..0000000000 --- a/apps/accounts/templates/accounts/password_reset_form.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %} -
- - {% bootstrap_form submit=_('Reset my password') %} - -{% endblock %} diff --git a/apps/accounts/templates/accounts/password_reset_subject.txt b/apps/accounts/templates/accounts/password_reset_subject.txt deleted file mode 100644 index 711709a436..0000000000 --- a/apps/accounts/templates/accounts/password_reset_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{% load i18n %}[{{ site_name }}] {% trans "Password reset" %} \ No newline at end of file diff --git a/apps/accounts/templates/accounts/profile_update_form.html b/apps/accounts/templates/accounts/profile_update_form.html deleted file mode 100644 index 3c02180e98..0000000000 --- a/apps/accounts/templates/accounts/profile_update_form.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} - -{% block page %} - -- {% trans "Please enter your updated account information." %} -
- - - -{% endblock %} diff --git a/apps/accounts/templates/profile/profile_update_form.html b/apps/accounts/templates/profile/profile_update_form.html new file mode 100644 index 0000000000..1b5684eadb --- /dev/null +++ b/apps/accounts/templates/profile/profile_update_form.html @@ -0,0 +1,26 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% url 'account_change_password' as password_url %} + {% url 'account_email' as email_url %} + {% blocktrans trimmed %} + Please enter your updated account information. You can change your password using the password form and update your e-mail using the e-mail form. + {% endblocktrans %} +
+ + + +{% endblock %} diff --git a/apps/accounts/templates/registration/activate.html b/apps/accounts/templates/registration/activate.html deleted file mode 100644 index 248d1396eb..0000000000 --- a/apps/accounts/templates/registration/activate.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} - -{% block page %} - -- {% trans "Your account could not been validated. The provided url is not valid." %} -
- -{% endblock %} diff --git a/apps/accounts/templates/registration/activation_complete.html b/apps/accounts/templates/registration/activation_complete.html deleted file mode 100644 index f0a8077e4b..0000000000 --- a/apps/accounts/templates/registration/activation_complete.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n core_tags %} - -{% block page %} - -- {% trans "Your account is now activated." %} - {% if not user.is_authenticated %} - {% trans "You may go ahead and log in now." %} - {% endif %} -
- -- {% if not user.is_authenticated %}{% internal_link 'Login' 'login' %}{% endif %} -
- -{% endblock %} diff --git a/apps/accounts/templates/registration/activation_email.txt b/apps/accounts/templates/registration/activation_email.txt deleted file mode 100644 index 17e13bef42..0000000000 --- a/apps/accounts/templates/registration/activation_email.txt +++ /dev/null @@ -1,17 +0,0 @@ -{% load i18n core_tags %}{% trans "Dear" %} {{ user.profile.full_name }}, - -{% blocktrans trimmed with site_name=site.name %} -You are receiving this email because you have asked to register an account at -{{ site_name }}. If this wasn't you, please ignore this email -and your address will be removed from our records. -{% endblocktrans %} - -{% blocktrans trimmed %} -To activate this account, please click the following link within the next -{{ expiration_days }} days: -{% endblocktrans %} - - http://{{ site.domain }}{% url 'registration_activate' activation_key %} - -{% trans "Sincerely" %}, - RDMO Admins diff --git a/apps/accounts/templates/registration/activation_email_subject.txt b/apps/accounts/templates/registration/activation_email_subject.txt deleted file mode 100644 index 8fa3bf38b1..0000000000 --- a/apps/accounts/templates/registration/activation_email_subject.txt +++ /dev/null @@ -1 +0,0 @@ -{% load i18n %}[{{ site.name }}] {% trans "Account activation" %} \ No newline at end of file diff --git a/apps/accounts/templates/registration/registration_closed.html b/apps/accounts/templates/registration/registration_closed.html deleted file mode 100644 index b52d54f84a..0000000000 --- a/apps/accounts/templates/registration/registration_closed.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} - -{% block page %} - -- {% trans "Sorry, but registration is closed at this moment. Come back later." %} -
- -{% endblock %} diff --git a/apps/accounts/templates/registration/registration_complete.html b/apps/accounts/templates/registration/registration_complete.html deleted file mode 100644 index 75b1875554..0000000000 --- a/apps/accounts/templates/registration/registration_complete.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} - -{% block page %} - -- {% trans "We've emailed the activation link for your new account to the provided address." %} -
- -- {% trans "Please check your email to complete the registration process." %} -
- -{% endblock %} diff --git a/apps/accounts/templates/registration/registration_form.html b/apps/accounts/templates/registration/registration_form.html deleted file mode 100644 index 0a0c1a8c46..0000000000 --- a/apps/accounts/templates/registration/registration_form.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends 'core/page.html' %} -{% load i18n %} -{% load core_tags %} - -{% block page %} - -- {% trans "Please enter your desired username, your email address, and your desired password twice so we can verify you typed it in correctly." %} -
- - {% bootstrap_form submit=_('Register as a new user') %} - -{% endblock %} diff --git a/apps/accounts/templates/socialaccount/authentication_error.html b/apps/accounts/templates/socialaccount/authentication_error.html new file mode 100644 index 0000000000..c826248f8e --- /dev/null +++ b/apps/accounts/templates/socialaccount/authentication_error.html @@ -0,0 +1,15 @@ +{% extends 'core/page.html' %} +{% load i18n %} +{% load account %} +{% load socialaccount %} +{% load core_tags %} + +{% block page %} + ++ {% trans "An error occurred while attempting to login via your social network account." %} +
+ +{% endblock %} \ No newline at end of file diff --git a/apps/accounts/templates/socialaccount/connections.html b/apps/accounts/templates/socialaccount/connections.html new file mode 100644 index 0000000000..8b51c6c051 --- /dev/null +++ b/apps/accounts/templates/socialaccount/connections.html @@ -0,0 +1,66 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% blocktrans trimmed %} + You can sign in to your account using any of the following third party accounts: + {% endblocktrans %} +
+ + + ++ {% trans 'You currently have no social network accounts connected to this account.' %} +
+ + {% endif %} + ++ {% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to sign in.{% endblocktrans %} +
+ +{% endblock %} diff --git a/apps/accounts/templates/socialaccount/signup.html b/apps/accounts/templates/socialaccount/signup.html new file mode 100644 index 0000000000..62b6c0c55b --- /dev/null +++ b/apps/accounts/templates/socialaccount/signup.html @@ -0,0 +1,31 @@ +{% extends 'core/page.html' %} +{% load i18n %} + +{% block page %} + ++ {% blocktrans trimmed with provider_name=account.get_provider.name site_name=site.name %} + You are about to use your {{provider_name}} account to login to {{site_name}}. As a final step, please complete the following form:{% endblocktrans %} +
+ + + +