Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Try harder to go back in history when clicking cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
zerodogg committed Jan 15, 2010
1 parent 129ee76 commit 7421153
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tgitwebedit.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,7 @@ sub editFile
print '<input type="submit" value="Create and save file" />&nbsp;';
}
}
# FIXME: Add some magic so that if the back fails, we still forward
# to url()
print '<a href="'.$q->url().'"><input type="button" value="Cancel and discard changes" onclick="window.history.back(); return false;" /></a>';
print '<a href="'.$q->url().'"><input type="button" value="Cancel and discard changes" onclick="window.history.back(); if(window.history.length > 1) return false" /></a>';
print '</div>';
print '</form>';
print footer();
Expand Down

0 comments on commit 7421153

Please sign in to comment.