From e25d605cccbb17734db243b13437cfefff09dc96 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 26 Feb 2009 21:04:46 +0000 Subject: [PATCH] Add a cancel button to the Matrix Listing form. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/MatrixListing.pm | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index a77e424d8..ca3d6f63f 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -6,6 +6,7 @@ - fixed #9820: Survey: political party spelled wrong - fixed #9819: Survey: hoverhelp showing instead of field name - fixed #9822: Matrix: Wrong field label + - fixed #9823: Matrix: no cancel button in add/edit listing 7.6.13 - fixed AdSpace bug: impressions and clicks for most non-human web clients will not be counted. diff --git a/lib/WebGUI/Asset/MatrixListing.pm b/lib/WebGUI/Asset/MatrixListing.pm index f07c5347a..61ed40a2e 100644 --- a/lib/WebGUI/Asset/MatrixListing.pm +++ b/lib/WebGUI/Asset/MatrixListing.pm @@ -317,7 +317,15 @@ sub getEditForm { } } - $form->submit(); + $form->raw( + ''. + WebGUI::Form::Button($session, {}). + WebGUI::Form::Button($session, { + -value => $i18n->get('cancel', 'WebGUI'), + -extras => q|onclick="history.go(-1);" class="backwardButton"| + }). + '' + ); return $form; }