Combined the create and store URL, and the edit and update URL of the users to simplify the URL pattern settings, because they are handled by the same view now in the Mia core application application.
This commit is contained in:
@ -79,7 +79,7 @@ First written: 2020/8/9
|
||||
<i class="fas fa-chevron-circle-left"></i>
|
||||
{{ _("Back")|force_escape }}
|
||||
</a>
|
||||
<a class="btn btn-primary" role="button" href="{% url "mia_core:users.edit" user %}">
|
||||
<a class="btn btn-primary" role="button" href="{% url "mia_core:users.update" user %}">
|
||||
<i class="fas fa-user-cog"></i>
|
||||
{{ _("Settings")|force_escape }}
|
||||
</a>
|
||||
|
@ -42,7 +42,7 @@ First written: 2020/8/9
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form id="user-form" action="{% if request|is_in_section:"mia_core:my-account" %}{% url "mia_core:my-account.update" %}{% elif form.user %}{% url "mia_core:users.update" form.user %}{% else %}{% url "mia_core:users.store" %}{% endif %}" method="POST">
|
||||
<form id="user-form" action="{% if request|is_in_section:"mia_core:my-account" %}{% url "mia_core:my-account.update" %}{% elif form.user %}{% url "mia_core:users.update" form.user %}{% else %}{% url "mia_core:users.create" %}{% endif %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<input id="exists-url" type="hidden" value="{% url "mia_core:api.users.exists" "ID" %}" />
|
||||
<input id="user-login-id-original" type="hidden" value="{{ form.user.login_id }}" />
|
||||
|
Reference in New Issue
Block a user