mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Add "Reset to default" feature
This commit is contained in:
parent
7934de8ede
commit
32c760cc1d
1 changed files with 4 additions and 0 deletions
|
|
@ -6,6 +6,7 @@
|
|||
<th><div class="text">{% trans "Default" %}</div></th>
|
||||
<th><div class="text">{% trans "Value" %}</div></th>
|
||||
<th><div class="text">{% trans "Is modified" %}</div></th>
|
||||
<th><div class="text">{% trans "Reset to default" %}</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for item in config_values %}
|
||||
|
|
@ -27,6 +28,9 @@
|
|||
<img src="{% static 'admin/img/icon-no.'|add:icon_type %}" alt="{{ item.modified }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onClick="document.getElementById('{{ item.form_field.auto_id }}').value = '{{ item.default|escapejs }}'; return false;">Reset to default</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Reference in a new issue