mirror of https://gitlab.crans.org/bde/nk20
remove duplicated form
This commit is contained in:
parent
db95944574
commit
27391049f2
|
@ -164,8 +164,8 @@ class AliasView(LoginRequiredMixin,FormMixin,DetailView):
|
||||||
|
|
||||||
def get_context_data(self,**kwargs):
|
def get_context_data(self,**kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context["aliases"] = AliasTable(context['user_object'].note.alias_set.all())
|
note = context['user_object'].note
|
||||||
context["alias_form"] = AliasForm()
|
context["aliases"] = AliasTable(note.alias_set.all())
|
||||||
return context
|
return context
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<form method="post">
|
<form action="" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ alias_form |crispy }}
|
{{ form |crispy }}
|
||||||
<button class="btn btn-primary" type="submit">
|
<button class="btn btn-primary" type="submit">
|
||||||
{% trans "Add alias" %}
|
{% trans "Add alias" %}
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue