From: ethem Date: Wed, 5 Apr 2006 10:08:57 +0000 (+0000) Subject: Hide order details if an action emerges. (actions: capture, delete, refund, void) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=743d932c1130f8b2ad9f6e27a0361a849fac59ed;p=moodle.git Hide order details if an action emerges. (actions: capture, delete, refund, void) --- diff --git a/enrol/authorize/lib.php b/enrol/authorize/lib.php index c251c231af..a755e1ff57 100644 --- a/enrol/authorize/lib.php +++ b/enrol/authorize/lib.php @@ -148,14 +148,14 @@ function print_authorize_order_details($orderno) { global $CFG, $USER; global $strs, $authstrs; - $unenrol = optional_param('unenrol', ''); - $cmdconfirm = optional_param('confirm', '', PARAM_ALPHA); - $cmdcapture = optional_param(ORDER_CAPTURE, '', PARAM_ALPHA); $cmddelete = optional_param(ORDER_DELETE, '', PARAM_ALPHA); $cmdrefund = optional_param(ORDER_REFUND, '', PARAM_ALPHA); $cmdvoid = optional_param(ORDER_VOID, '', PARAM_ALPHA); + $unenrol = optional_param('unenrol', '', PARAM_ALPHA); + $confirm = optional_param('confirm', '', PARAM_ALPHA); + $table->width = '100%'; $table->size = array('30%', '70%'); $table->align = array('right', 'left'); @@ -185,7 +185,7 @@ function print_authorize_order_details($orderno) { $table->data[] = array("$authstrs->orderid:", $orderno); $table->data[] = array("$authstrs->transid:", $order->transid); $table->data[] = array("$authstrs->amount:", "$order->currency $order->amount"); - if ((empty($cmdcapture) and empty($cmdrefund) and empty($cmdvoid))) { + if (empty($cmdcapture) and empty($cmdrefund) and empty($cmdvoid) and empty($cmddelete)) { $table->data[] = array("$strs->course:", $order->shortname); $table->data[] = array("$strs->status:", $authstrs->{$status->status}); $table->data[] = array("$strs->user:", $order->ccname); @@ -201,7 +201,7 @@ function print_authorize_order_details($orderno) { error(get_string('youcantdo', 'enrol_authorize', $a)); } - if (empty($cmdconfirm)) { + if (empty($confirm)) { $table->data[] = array("$strs->confirm:", "$authstrs->captureyes
$strs->yes     $strs->no"); @@ -266,7 +266,7 @@ function print_authorize_order_details($orderno) { } else { $amount = format_float(optional_param('amount', $upto), 2); - if (($amount > $upto) || empty($cmdconfirm)) { + if (($amount > $upto) || empty($confirm)) { $a->upto = $upto; $strcanbecredit = get_string('canbecredit', 'enrol_authorize', $a); $table->data[] = array("$authstrs->unenrolstudent", @@ -311,7 +311,7 @@ function print_authorize_order_details($orderno) { $suborderno = optional_param('suborder', 0, PARAM_INT); if (empty($suborderno)) { // cancel original transaction. - if (empty($cmdconfirm)) { + if (empty($confirm)) { $strvoidyes = get_string('voidyes', 'enrol_authorize'); $table->data[] = array("$strs->confirm:", "$strvoidyes
@@ -347,7 +347,7 @@ function print_authorize_order_details($orderno) { error("Transaction can not be voided because of already been voided."); } else { - if (empty($cmdconfirm)) { + if (empty($confirm)) { $a->transid = $suborder->transid; $a->amount = $suborder->amount; $strsubvoidyes = get_string('subvoidyes', 'enrol_authorize', $a); @@ -392,7 +392,7 @@ function print_authorize_order_details($orderno) { $a->action = $authstrs->delete; error(get_string('youcantdo', 'enrol_authorize', $a)); } - if (empty($cmdconfirm)) { + if (empty($confirm)) { $table->data[] = array("$authstrs->unenrolstudent", "");