Ticket #7361: 7361.admin-cancel-delete.diff

File 7361.admin-cancel-delete.diff, 1.9 KB (added by Julien Phalip, 13 years ago)

Cancel action as a link

  • django/contrib/admin/static/admin/css/base.css

    diff --git a/django/contrib/admin/static/admin/css/base.css b/django/contrib/admin/static/admin/css/base.css
    index 23fddaf..22804bb 100644
    a b input[type=text], input[type=password], textarea, select, .vTextField {  
    453453        opacity: 0.4;
    454454}
    455455
     456form a.cancel-that {
     457    font-size: 11px;
     458    margin: 2px 0px;
     459    padding: 3px 5px;
     460    vertical-align: middle;
     461}
    456462
    457463/* MODULES */
    458464
  • django/contrib/admin/templates/admin/delete_confirmation.html

    diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html
    index 0e6d47e..76a6cd0 100644
    a b  
    3535    <form action="" method="post">{% csrf_token %}
    3636    <div>
    3737    <input type="hidden" name="post" value="yes" />
    38     <input type="submit" value="{% trans "Yes, I'm sure" %}" />
     38    <input type="submit" value="{% trans "Yes, I'm sure" %}" /> <a class="cancel-that" href="../">{% trans "No, cancel that." %}</a>
    3939    </div>
    4040    </form>
    4141{% endif %}
  • django/contrib/admin/templates/admin/delete_selected_confirmation.html

    diff --git a/django/contrib/admin/templates/admin/delete_selected_confirmation.html b/django/contrib/admin/templates/admin/delete_selected_confirmation.html
    index 127519b..9a46d81 100644
    a b  
    4040    {% endfor %}
    4141    <input type="hidden" name="action" value="delete_selected" />
    4242    <input type="hidden" name="post" value="yes" />
    43     <input type="submit" value="{% trans "Yes, I'm sure" %}" />
     43    <input type="submit" value="{% trans "Yes, I'm sure" %}" /> <a class="cancel-that" href="">{% trans "No, cancel that." %}</a>
    4444    </div>
    4545    </form>
    4646{% endif %}
Back to Top