Add "Reset to default" feature

This commit is contained in:
Rares Vernica (cessna, fedora) 2016-11-30 12:39:55 -08:00
parent 7934de8ede
commit 32c760cc1d

View file

@ -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>