Commit 3ce61935 by Kálmán Viktor

dashboard: fix copypaste errors

parent 20dd2231
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
{% trans "list" %} {% trans "list" %}
{% endif %} {% endif %}
</a> </a>
<a class="btn btn-success btn-xs user-create" href="{% url "dashboard.views.group-create" %}"><i class="fa fa-plus-circle"></i> {% trans "new" %} </a> <a class="btn btn-success btn-xs user-create" href="{% url "dashboard.views.user-create" %}"><i class="fa fa-plus-circle"></i> {% trans "new" %} </a>
</div> </div>
</div> </div>
</div> </div>
......
{% extends "dashboard/base.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block content %} {% block content %}
{% crispy form %} {% crispy form %}
{% endblock %} {% endblock %}
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<a href="{% url "dashboard.views.user-create" %}" class="pull-right btn btn-success btn-xs template-choose"> <a href="{% url "dashboard.views.user-create" %}" class="pull-right btn btn-success btn-xs">
<i class="fa fa-plus"></i> {% trans "new user" %} <i class="fa fa-plus"></i> {% trans "new user" %}
</a> </a>
<h3 class="no-margin"><i class="fa fa-user"></i> {% trans "Users" %}</h3> <h3 class="no-margin"><i class="fa fa-user"></i> {% trans "Users" %}</h3>
......
...@@ -273,6 +273,18 @@ class UserCreationView(LoginRequiredMixin, PermissionRequiredMixin, ...@@ -273,6 +273,18 @@ class UserCreationView(LoginRequiredMixin, PermissionRequiredMixin,
template_name = 'dashboard/user-create.html' template_name = 'dashboard/user-create.html'
permission_required = "auth.add_user" permission_required = "auth.add_user"
def get_template_names(self):
return ['dashboard/nojs-wrapper.html']
def get_context_data(self, *args, **kwargs):
context = super(UserCreationView, self).get_context_data(*args,
**kwargs)
context.update({
'template': self.template_name,
'box_title': _('Create a User'),
})
return context
def get_success_url(self): def get_success_url(self):
return reverse('dashboard.views.profile', args=[self.object.username]) return reverse('dashboard.views.profile', args=[self.object.username])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment