Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
fix bug 777827 - Don't always disable forms upon submission
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Aug 16, 2012
1 parent 59a3c09 commit cffc862
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/wiki/templates/wiki/document_revisions.html
Expand Up @@ -28,7 +28,7 @@ <h1 class="title">{{ _('History of') }} <a href="{{ url('wiki.document', documen
</div>
<div id="revision-list">
{% if revisions %}
<form action="{{ url('wiki.compare_revisions', document.full_path) }}" method="get">
<form action="{{ url('wiki.compare_revisions', document.full_path) }}" method="get" class="nodisable">
{% if revisions | length > 1 %}
<div class="compare top">
<input type="submit" class="link-btn" value="{% if document.parent %}{{ _('Compare Selected Translations') }}{% else %}{{ _('Compare Selected Revisions') }}{% endif %}" />
Expand Down
4 changes: 4 additions & 0 deletions media/js/main.js
Expand Up @@ -79,6 +79,10 @@ k = {};
function disableFormsOnSubmit() {
$('form').submit(function(ev) {
var $this = $(this);

// Allow for a special CSS class to prevent this functionality
if($this.hasClass('nodisable')) return;

if ($this.data('disabled')) {
ev.preventDefault();
} else {
Expand Down

0 comments on commit cffc862

Please sign in to comment.