Change save button to create on creation form

This commit is contained in:
Edgar P. Burkhart 2023-04-20 12:03:30 +02:00
parent 37bb725f23
commit df19c5586d
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 11 additions and 3 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.0.1\n" "Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-20 12:00+0200\n" "POT-Creation-Date: 2023-04-20 12:02+0200\n"
"PO-Revision-Date: 2022-12-21 17:30+0100\n" "PO-Revision-Date: 2022-12-21 17:30+0100\n"
"Last-Translator: edpibu <git@edgarpierre.fr>\n" "Last-Translator: edpibu <git@edgarpierre.fr>\n"
"Language-Team: edpibu <git@edgarpierre.fr>\n" "Language-Team: edpibu <git@edgarpierre.fr>\n"
@ -231,7 +231,11 @@ msgstr "Supprimer"
msgid "Reset" msgid "Reset"
msgstr "Réinitialiser" msgstr "Réinitialiser"
#: .\templates\main\form\form_base.html:32 #: .\templates\main\form\form_base.html:33
msgid "Create"
msgstr "Créer"
#: .\templates\main\form\form_base.html:35
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"

View file

@ -29,7 +29,11 @@
<a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a> <a class="del" href="{{ form.instance.get_delete_url }}">{% translate "Delete" %}</a>
{% endif %} {% endif %}
<input type="reset" value="{% translate "Reset" %}" /> <input type="reset" value="{% translate "Reset" %}" />
<input type="submit" value="{% translate "Save" %}" /> {% if form.instance.adding %}
<input type="submit" value="{% translate "Create" %}" />
{% else %}
<input type="submit" value="{% translate "Save" %}" />
{% endif %}
{% endblock %} {% endblock %}
</td> </td>
</tr> </tr>