Skip to content
Browse files

Support nested Actions (Admin/Countries Application)

  • Loading branch information...
1 parent fe32d5c commit 88c50acb787614f657b9c2e3f0465d252fa6739a @haraldpdl haraldpdl committed with Jul 30, 2010
Showing with 225 additions and 129 deletions.
  1. +0 −22 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDelete.php
  2. +38 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDelete/Process.php
  3. +0 −22 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDeleteZones.php
  4. +38 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDeleteZones/Process.php
  5. +0 −13 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Delete.php
  6. +29 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Delete/Process.php
  7. +0 −18 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Save.php
  8. +34 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Save/Process.php
  9. +0 −13 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneDelete.php
  10. +29 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneDelete/Process.php
  11. +0 −17 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneSave.php
  12. +33 −0 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneSave/Process.php
  13. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/batch_delete.php
  14. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/delete.php
  15. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/edit.php
  16. +4 −4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/main.php
  17. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/new.php
  18. +4 −4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones.php
  19. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_batch_delete.php
  20. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_delete.php
  21. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_edit.php
  22. +2 −2 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_new.php
View
22 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDelete.php
@@ -11,33 +11,11 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class BatchDelete {
public static function execute(ApplicationAbstract $application) {
if ( isset($_POST['batch']) && is_array($_POST['batch']) && !empty($_POST['batch']) ) {
$application->setPageContent('batch_delete.php');
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- $error = false;
-
- foreach ( $_POST['batch'] as $id ) {
- if ( !Countries::delete($id) ) {
- $error = true;
- break;
- }
- }
-
- if ( $error === false ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink());
- }
}
}
}
View
38 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDelete/Process.php
@@ -0,0 +1,38 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\BatchDelete;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $error = false;
+
+ foreach ( $_POST['batch'] as $id ) {
+ if ( !Countries::delete($id) ) {
+ $error = true;
+ break;
+ }
+ }
+
+ if ( $error === false ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink());
+ }
+ }
+?>
View
22 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDeleteZones.php
@@ -11,33 +11,11 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class BatchDeleteZones {
public static function execute(ApplicationAbstract $application) {
if ( isset($_POST['batch']) && is_array($_POST['batch']) && !empty($_POST['batch']) ) {
$application->setPageContent('zones_batch_delete.php');
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- $error = false;
-
- foreach ( $_POST['batch'] as $id ) {
- if ( !Countries::deleteZone($id) ) {
- $error = true;
- break;
- }
- }
-
- if ( $error === false ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
- }
}
}
}
View
38 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/BatchDeleteZones/Process.php
@@ -0,0 +1,38 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\BatchDeleteZones;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $error = false;
+
+ foreach ( $_POST['batch'] as $id ) {
+ if ( !Countries::deleteZone($id) ) {
+ $error = true;
+ break;
+ }
+ }
+
+ if ( $error === false ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
+ }
+ }
+?>
View
13 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Delete.php
@@ -11,23 +11,10 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class Delete {
public static function execute(ApplicationAbstract $application) {
$application->setPageContent('delete.php');
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- if ( Countries::delete($_GET['id']) ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink());
- }
}
}
?>
View
29 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Delete/Process.php
@@ -0,0 +1,29 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\Delete;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ if ( Countries::delete($_GET['id']) ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink());
+ }
+ }
+?>
View
18 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Save.php
@@ -11,9 +11,6 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class Save {
public static function execute(ApplicationAbstract $application) {
@@ -22,21 +19,6 @@ public static function execute(ApplicationAbstract $application) {
} else {
$application->setPageContent('new.php');
}
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- $data = array('name' => $_POST['countries_name'],
- 'iso_code_2' => $_POST['countries_iso_code_2'],
- 'iso_code_3' => $_POST['countries_iso_code_3'],
- 'address_format' => $_POST['address_format']);
-
- if ( Countries::save((isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null), $data) ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink());
- }
}
}
?>
View
34 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/Save/Process.php
@@ -0,0 +1,34 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\Save;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $data = array('name' => $_POST['countries_name'],
+ 'iso_code_2' => $_POST['countries_iso_code_2'],
+ 'iso_code_3' => $_POST['countries_iso_code_3'],
+ 'address_format' => $_POST['address_format']);
+
+ if ( Countries::save((isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null), $data) ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink());
+ }
+ }
+?>
View
13 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneDelete.php
@@ -11,23 +11,10 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class ZoneDelete {
public static function execute(ApplicationAbstract $application) {
$application->setPageContent('zones_delete.php');
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- if ( Countries::deleteZone($_GET['zID']) ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
- }
}
}
?>
View
29 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneDelete/Process.php
@@ -0,0 +1,29 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\ZoneDelete;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ if ( Countries::deleteZone($_GET['zID']) ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
+ }
+ }
+?>
View
17 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneSave.php
@@ -11,9 +11,6 @@
namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action;
use osCommerce\OM\Core\ApplicationAbstract;
- use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
- use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\OSCOM;
class ZoneSave {
public static function execute(ApplicationAbstract $application) {
@@ -22,20 +19,6 @@ public static function execute(ApplicationAbstract $application) {
} else {
$application->setPageContent('zones_new.php');
}
-
- if ( isset($_POST['subaction']) && ($_POST['subaction'] == 'confirm') ) {
- $data = array('name' => $_POST['zone_name'],
- 'code' => $_POST['zone_code'],
- 'country_id' => $_GET['id']);
-
- if ( Countries::saveZone((isset($_GET['zID']) && is_numeric($_GET['zID']) ? $_GET['zID'] : null), $data) ) {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
- } else {
- Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
- }
-
- osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
- }
}
}
?>
View
33 osCommerce/OM/Core/Site/Admin/Application/Countries/Action/ZoneSave/Process.php
@@ -0,0 +1,33 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Admin\Application\Countries\Action\ZoneSave;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Site\Admin\Application\Countries\Countries;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $data = array('name' => $_POST['zone_name'],
+ 'code' => $_POST['zone_code'],
+ 'country_id' => $_GET['id']);
+
+ if ( Countries::saveZone((isset($_GET['zID']) && is_numeric($_GET['zID']) ? $_GET['zID'] : null), $data) ) {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
+ } else {
+ Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
+ }
+
+ osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
+ }
+ }
+?>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/batch_delete.php
@@ -36,13 +36,13 @@
<div class="infoBox">
<h3><?php echo osc_icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_countries'); ?></h3>
- <form name="cDeleteBatch" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'action=BatchDelete'); ?>" method="post">
+ <form name="cDeleteBatch" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'BatchDelete&Process'); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_batch_delete_countries'); ?></p>
<p><?php echo $names_string; ?></p>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/delete.php
@@ -26,13 +26,13 @@
<div class="infoBox">
<h3><?php echo osc_icon('trash.png') . ' ' . $OSCOM_ObjectInfo->getProtected('countries_name'); ?></h3>
- <form name="cDelete" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=Delete'); ?>" method="post">
+ <form name="cDelete" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'Delete&Process&id=' . $_GET['id']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_delete_country'); ?></p>
<p><?php echo '<b>' . $OSCOM_ObjectInfo->getProtected('countries_name') . '</b>'; ?></p>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/edit.php
@@ -26,7 +26,7 @@
<div class="infoBox">
<h3><?php echo osc_icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('countries_name'); ?></h3>
- <form name="cEdit" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=Save'); ?>" method="post">
+ <form name="cEdit" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'Save&Process&id=' . $_GET['id']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_edit_country'); ?></p>
@@ -37,7 +37,7 @@
<p><label for="address_format"><?php echo OSCOM::getDef('field_address_format'); ?></label><?php echo osc_draw_textarea_field('address_format', $OSCOM_ObjectInfo->get('address_format')); ?><br /><i>:name</i>, <i>:street_address</i>, <i>:suburb</i>, <i>:city</i>, <i>:postcode</i>, <i>:state</i>, <i>:state_code</i>, <i>:country</i></p>
</fieldset>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
8 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/main.php
@@ -22,7 +22,7 @@
<form id="liveSearchForm">
<input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo osc_draw_button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
- <span style="float: right;"><?php echo osc_draw_button(array('href' => OSCOM::getLink(null, null, 'action=Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
+ <span style="float: right;"><?php echo osc_draw_button(array('href' => OSCOM::getLink(null, null, 'Save'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
<div style="padding: 20px 5px 5px 5px; height: 16px;">
@@ -44,7 +44,7 @@
</thead>
<tfoot>
<tr>
- <th align="right" colspan="4"><?php echo '<input type="image" src="' . osc_icon_raw('trash.png') . '" title="' . OSCOM::getDef('icon_trash') . '" onclick="document.batch.action=\'' . OSCOM::getLink(null, null, 'action=BatchDelete') . '\';" />'; ?></th>
+ <th align="right" colspan="4"><?php echo '<input type="image" src="' . osc_icon_raw('trash.png') . '" title="' . OSCOM::getDef('icon_trash') . '" onclick="document.batch.action=\'' . OSCOM::getLink(null, null, 'BatchDelete') . '\';" />'; ?></th>
<th align="center" width="20"><?php echo osc_draw_checkbox_field('batchFlag', null, null, 'onclick="flagCheckboxes(this);"'); ?></th>
</tr>
</tfoot>
@@ -80,10 +80,10 @@
var countryFlag = '<?php echo osc_image('images/worldflags/COUNTRYISOCODE2.png', 'COUNTRYNAME'); ?>';
- var countryEditLink = '<?php echo OSCOM::getLink(null, null, 'id=COUNTRYID&action=Save'); ?>';
+ var countryEditLink = '<?php echo OSCOM::getLink(null, null, 'Save&id=COUNTRYID'); ?>';
var countryEditLinkIcon = '<?php echo osc_icon('edit.png'); ?>';
- var countryDeleteLink = '<?php echo OSCOM::getLink(null, null, 'id=COUNTRYID&action=Delete'); ?>';
+ var countryDeleteLink = '<?php echo OSCOM::getLink(null, null, 'Delete&id=COUNTRYID'); ?>';
var countryDeleteLinkIcon = '<?php echo osc_icon('trash.png'); ?>';
var osC_DataTable = new osC_DataTable();
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/new.php
@@ -22,7 +22,7 @@
<div class="infoBox">
<h3><?php echo osc_icon('new.png') . ' ' . OSCOM::getDef('action_heading_new_country'); ?></h3>
- <form name="cNew" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'action=Save'); ?>" method="post">
+ <form name="cNew" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'Save&Process'); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_new_country'); ?></p>
@@ -33,7 +33,7 @@
<p><label for="address_format"><?php echo OSCOM::getDef('field_address_format'); ?></label><?php echo osc_draw_textarea_field('address_format'); ?><br /><i>:name</i>, <i>:street_address</i>, <i>:suburb</i>, <i>:city</i>, <i>:postcode</i>, <i>:state</i>, <i>:state_code</i>, <i>:country</i></p>
</fieldset>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
8 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones.php
@@ -22,7 +22,7 @@
<form id="liveSearchForm">
<input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><?php echo osc_draw_button(array('type' => 'button', 'params' => 'onclick="osC_DataTable.reset();"', 'title' => 'Reset')); ?>
- <span style="float: right;"><?php echo osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=ZoneSave'), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
+ <span style="float: right;"><?php echo osc_draw_button(array('href' => OSCOM::getLink(), 'priority' => 'secondary', 'icon' => 'triangle-1-w', 'title' => OSCOM::getDef('button_back'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'ZoneSave&id=' . $_GET['id']), 'icon' => 'plus', 'title' => OSCOM::getDef('button_insert'))); ?></span>
</form>
<div style="padding: 20px 5px 5px 5px; height: 16px;">
@@ -43,7 +43,7 @@
</thead>
<tfoot>
<tr>
- <th align="right" colspan="3"><?php echo '<input type="image" src="' . osc_icon_raw('trash.png') . '" title="' . OSCOM::getDef('icon_trash') . '" onclick="document.batch.action=\'' . OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=BatchDeleteZones') . '\';" />'; ?></th>
+ <th align="right" colspan="3"><?php echo '<input type="image" src="' . osc_icon_raw('trash.png') . '" title="' . OSCOM::getDef('icon_trash') . '" onclick="document.batch.action=\'' . OSCOM::getLink(null, null, 'BatchDeleteZones&id=' . $_GET['id']) . '\';" />'; ?></th>
<th align="center" width="20"><?php echo osc_draw_checkbox_field('batchFlag', null, null, 'onclick="flagCheckboxes(this);"'); ?></th>
</tr>
</tfoot>
@@ -74,10 +74,10 @@
var dataTableName = 'countryZonesDataTable';
var dataTableDataURL = '<?php echo OSCOM::getRPCLink(null, null, 'id=' . $_GET['id'] . '&action=getAllZones'); ?>';
- var zoneEditLink = '<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&zID=ZONEID&action=ZoneSave'); ?>';
+ var zoneEditLink = '<?php echo OSCOM::getLink(null, null, 'ZoneSave&id=' . $_GET['id'] . '&zID=ZONEID'); ?>';
var zoneEditLinkIcon = '<?php echo osc_icon('edit.png'); ?>';
- var zoneDeleteLink = '<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&zID=ZONEID&action=ZoneDelete'); ?>';
+ var zoneDeleteLink = '<?php echo OSCOM::getLink(null, null, 'ZoneDelete&id=' . $_GET['id'] . '&zID=ZONEID'); ?>';
var zoneDeleteLinkIcon = '<?php echo osc_icon('trash.png'); ?>';
var osC_DataTable = new osC_DataTable();
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_batch_delete.php
@@ -36,13 +36,13 @@
<div class="infoBox">
<h3><?php echo osc_icon('trash.png') . ' ' . OSCOM::getDef('action_heading_batch_delete_zones'); ?></h3>
- <form name="cDeleteBatch" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=BatchDeleteZones'); ?>" method="post">
+ <form name="cDeleteBatch" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'BatchDeleteZones&Process&id=' . $_GET['id']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_batch_delete_zones'); ?></p>
<p><?php echo $names_string; ?></p>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_delete.php
@@ -26,13 +26,13 @@
<div class="infoBox">
<h3><?php echo osc_icon('trash.png') . ' ' . $OSCOM_ObjectInfo->getProtected('zone_name'); ?></h3>
- <form name="zDelete" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&zID=' . $_GET['zID'] . '&action=ZoneDelete'); ?>" method="post">
+ <form name="zDelete" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'ZoneDelete&Process&id=' . $_GET['id'] . '&zID=' . $_GET['zID']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_delete_zone'); ?></p>
<p><?php echo '<b>' . $OSCOM_ObjectInfo->getProtected('zone_name') . '</b>'; ?></p>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'trash', 'title' => OSCOM::getDef('button_delete'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_edit.php
@@ -26,7 +26,7 @@
<div class="infoBox">
<h3><?php echo osc_icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('zone_name'); ?></h3>
- <form name="zEdit" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&zID=' . $_GET['zID'] . '&action=ZoneSave'); ?>" method="post">
+ <form name="zEdit" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'ZoneSave&Process&id=' . $_GET['id'] . '&zID=' . $_GET['zID']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_edit_zone'); ?></p>
@@ -35,7 +35,7 @@
<p><label for="zone_code"><?php echo OSCOM::getDef('field_zone_code'); ?></label><?php echo osc_draw_input_field('zone_code', $OSCOM_ObjectInfo->get('zone_code')); ?></p>
</fieldset>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>
View
4 osCommerce/OM/Core/Site/Admin/Application/Countries/pages/zones_new.php
@@ -22,7 +22,7 @@
<div class="infoBox">
<h3><?php echo osc_icon('new.png') . ' ' . OSCOM::getDef('action_heading_new_zone'); ?></h3>
- <form name="zNew" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'id=' . $_GET['id'] . '&action=ZoneSave'); ?>" method="post">
+ <form name="zNew" class="dataForm" action="<?php echo OSCOM::getLink(null, null, 'ZoneSave&Process&id=' . $_GET['id']); ?>" method="post">
<p><?php echo OSCOM::getDef('introduction_new_zone'); ?></p>
@@ -31,7 +31,7 @@
<p><label for="zone_code"><?php echo OSCOM::getDef('field_zone_code'); ?></label><?php echo osc_draw_input_field('zone_code'); ?></p>
</fieldset>
- <p><?php echo osc_draw_hidden_field('subaction', 'confirm') . osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
+ <p><?php echo osc_draw_button(array('priority' => 'primary', 'icon' => 'check', 'title' => OSCOM::getDef('button_save'))) . ' ' . osc_draw_button(array('href' => OSCOM::getLink(null, null, 'id=' . $_GET['id']), 'priority' => 'secondary', 'icon' => 'close', 'title' => OSCOM::getDef('button_cancel'))); ?></p>
</form>
</div>

0 comments on commit 88c50ac

Please sign in to comment.
Something went wrong with that request. Please try again.