From: peter Date: Sat, 17 Nov 2007 23:34:44 +0000 (+0000) Subject: - added functionality to disable order button when no events in cart X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=ae41bf2251b90cf0f6ec30cda1c72adc9c9e75ce;p=konrad%2Fsmoke.git - added functionality to disable order button when no events in cart git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@79 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/www/inc/cart_listing.php b/www/inc/cart_listing.php index bd3f9a9..149df88 100644 --- a/www/inc/cart_listing.php +++ b/www/inc/cart_listing.php @@ -44,6 +44,7 @@ function createCartOverview() $p->setVar("AMOUNT", $amountValue); } + // set submit functionality $p->setVar("linkDELETEROW", "index.php?mode=cart&action=deleteEvent&event=".$event->getEventId()); $p->setVar("fieldAMOUNT", "ms_amount[]"); @@ -58,9 +59,12 @@ function createCartOverview() $tablerows .= $p->parse($cartRowTmpl); } - // if no tickets in cart set EMPTYROWS + // if no tickets in cart set EMPTYROWS and disable order button if (count($cart->getTickets()) == 0) { $tablerows = $p->getVar("EMPTYROWS"); + $p->setVar("attribDISABLED", "disabled=\"disabled\""); + } else { + $p->setVar("attribDISABLED", ""); } $p->setVar("TABLEROWS", $tablerows); diff --git a/www/template/de/cart.html b/www/template/de/cart.html index 1ebce7a..624bbaa 100644 --- a/www/template/de/cart.html +++ b/www/template/de/cart.html @@ -39,7 +39,7 @@
- +
#if:IS_HIDDEN==true @HIDDENAREA@