Login

Admin Save and view next button html

Author:
ungenio41
Posted:
May 2, 2010
Language:
HTML/template
Version:
Not specified
Tags:
admin view save button next 1.2
Score:
2 (after 2 ratings)

See link for description.

Note: Requires Django 1.2.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{% extends "admin/change_form.html" %}
{% load i18n %}
{% block content %}
{{ block.super }}
<script type="text/javascript">//<![CDATA[
    (function($){
        $('<input type="submit" value="{% trans 'Save and view next' %}" name="_viewnext" />')
        .prependTo('div.submit-row');
    })(django.jQuery);
//]]></script>
{% endblock %}

More like this

  1. Admin Save and view next button by ungenio41 6 years, 3 months ago
  2. URLField admin widget with View Link button by ungenio41 6 years, 4 months ago
  3. Add buttons in admin forms by mamat 7 years, 12 months ago
  4. Accordion changelist admin by djm 5 years, 8 months ago
  5. Button Admin by delfick 6 years, 8 months ago

Comments

deadbeef404 (on December 7, 2010):
<p>Cheers for this (and the other related snippet)</p>

#

ffsffd (on July 6, 2011):
<p>you can also override admin/submit_line.html</p> <p>{% if show_save %}<input type="submit" value="{% trans 'Save and view next' %}" name="_viewnext" {{ onclick_attrib }}/> <input type="submit" value="{% trans 'Save' %}" class="default" name="_save" {{ onclick_attrib }}/&gt{% endif %}</p> <p>unfortunately this template can't be overriden on per app model</p>

#

Please login first before commenting.