Skip to content

Commit

Permalink
Merge pull request #17 from ggoffy/master
Browse files Browse the repository at this point in the history
move to RC1
  • Loading branch information
ggoffy authored Jan 26, 2021
2 parents de98bb8 + 243b984 commit dd5d089
Show file tree
Hide file tree
Showing 92 changed files with 3,114 additions and 557 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp8.png)

## wgSimpleAcc module for [XOOPS CMS 2.5.11+](https://xoops.org)

Expand Down
14 changes: 11 additions & 3 deletions accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
$GLOBALS['xoopsTpl']->assign('accountlist_sort', $accountlist_sort);
$GLOBALS['xoopsTpl']->assign('accounts_submit', $permAccountsSubmit);
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNTS];
break;
case 'save':
// Security Check
Expand Down Expand Up @@ -131,6 +134,10 @@
$accountsObj = $accountsHandler->create();
$form = $accountsObj->getFormAccounts();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNTS, 'link' => 'accounts.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNT_ADD];
break;
case 'edit':
// Check params
Expand All @@ -145,6 +152,10 @@
// Get Form
$form = $accountsObj->getFormAccounts();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNTS, 'link' => 'accounts.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNT_EDIT];
break;
case 'delete':
// Check params
Expand Down Expand Up @@ -211,9 +222,6 @@
break;
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ACCOUNTS];

// Keywords
wgsimpleaccMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
unset($keywords);
Expand Down
8 changes: 4 additions & 4 deletions admin/transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
$transactionDateObj = \DateTime::createFromFormat(_SHORTDATESTRING, Request::getString('tra_date'));
$transactionsObj->setVar('tra_date', $transactionDateObj->getTimestamp());
$transactionsObj->setVar('tra_curid', Request::getInt('tra_curid', 0));
$traAmountin = Request::getString('tra_amountin');
$transactionsObj->setVar('tra_amountin', Utility::StringToFloat($traAmountin));
$traAmountout = Request::getString('tra_amountout');
$transactionsObj->setVar('tra_amountout', Utility::StringToFloat($traAmountout));
$traAmountin = Utility::StringToFloat(Request::getString('tra_amountin'));
$transactionsObj->setVar('tra_amountin', $traAmountin);
$traAmountout = Utility::StringToFloat(Request::getString('tra_amountout'));
$transactionsObj->setVar('tra_amountout', $traAmountout);
$transactionsObj->setVar('tra_taxid', Request::getInt('tra_taxid', 0));
$transactionsObj->setVar('tra_status', Request::getInt('tra_status', 0));
$transactionsObj->setVar('tra_comments', Request::getInt('tra_comments', 0));
Expand Down
21 changes: 16 additions & 5 deletions allocations.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
switch ($op) {
case 'list':
default:

if ($allocationsCount > 0) {
$GLOBALS['xoTheme']->addStylesheet(WGSIMPLEACC_URL . '/assets/css/nestedsortable.css');
if ($permAllocationsSubmit) {
Expand All @@ -79,7 +78,10 @@
$GLOBALS['xoopsTpl']->assign('allocationlist_sort', $allocationlist_sort);
$GLOBALS['xoopsTpl']->assign('allocations_submit', $permAllocationsSubmit);
}
break;

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATIONS];
break;
case 'save':
// Security Check
if (!$GLOBALS['xoopsSecurity']->check()) {
Expand Down Expand Up @@ -128,6 +130,10 @@
$allocationsObj = $allocationsHandler->create();
$form = $allocationsObj->getFormAllocations();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATIONS, 'link' => 'allocations.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATION_ADD];
break;
case 'edit':
// Check params
Expand All @@ -143,6 +149,10 @@

$form = $allocationsObj->getFormAllocations();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATIONS, 'link' => 'allocations.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATION_EDIT];
break;
case 'delete':
// Check params
Expand Down Expand Up @@ -188,6 +198,10 @@
\sprintf(\_MA_WGSIMPLEACC_FORM_SURE_DELETE, $allocationsObj->getVar('all_name')));
$form = $xoopsconfirm->getFormXoopsConfirm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATIONS, 'link' => 'allocations.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATION_EDIT];
}
break;
case 'order':
Expand Down Expand Up @@ -217,9 +231,6 @@
break;
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ALLOCATIONS];

// Keywords
wgsimpleaccMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
unset($keywords);
Expand Down
16 changes: 13 additions & 3 deletions assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
}
}
// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSETS];
break;
case 'save':
// Security Check
Expand Down Expand Up @@ -138,6 +140,10 @@
$assetsObj = $assetsHandler->create();
$form = $assetsObj->getFormAssets();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSETS, 'link' => 'assets.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSET_ADD];
break;
case 'edit':
// Check params
Expand All @@ -153,6 +159,9 @@
$assetsObj = $assetsHandler->get($asId);
$form = $assetsObj->getFormAssets();
$GLOBALS['xoopsTpl']->assign('form', $form->render());
// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSETS, 'link' => 'assets.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSET_EDIT];
break;
case 'delete':
// Check params
Expand Down Expand Up @@ -201,13 +210,14 @@
\sprintf(\_MA_WGSIMPLEACC_FORM_SURE_DELETE, $assetsObj->getVar('as_name')));
$form = $xoopsconfirm->getFormXoopsConfirm();
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSETS, 'link' => 'assets.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSET_EDIT];
}
break;
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_ASSETS];

// Keywords
wgsimpleaccMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
unset($keywords);
Expand Down
Binary file modified assets/icons/16/status1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/16/status2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/16/status3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/icons/16/status4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icons/16/status6.png
Binary file not shown.
Binary file added assets/icons/16/status7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icons/16/status9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions balances.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
$strFilter = "&balanceFrom=$balanceFrom&balanceTo=$balanceTo";
$GLOBALS['xoopsTpl']->assign('balfilter', $strFilter);
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCES, 'link' => 'balances.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCE_PRECALC];
break;

case 'list':
Expand Down Expand Up @@ -133,6 +137,9 @@
$GLOBALS['xoopsTpl']->assign('divideby', $helper->getConfig('divideby'));
$GLOBALS['xoopsTpl']->assign('numb_col', $helper->getConfig('numb_col'));
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCES];
break;
case 'save':
// Check permissions
Expand Down Expand Up @@ -187,7 +194,8 @@
$crTransactions->add(new \Criteria('tra_date', $balanceFrom, '>='));
$crTransactions->add(new \Criteria('tra_date', $balanceTo, '<='));
$crTransactions->add(new \Criteria('tra_asid', $asset['id']));
$transactionsHandler->updateAll('tra_status', 6, $crTransactions, true);
$crTransactions->add(new \Criteria('tra_status', Constants::STATUS_SUBMITTED, '>'));
$transactionsHandler->updateAll('tra_status', Constants::STATUS_LOCKED, $crTransactions, true);
$transactionsHandler->updateAll('tra_balid', $newBalId, $crTransactions, true);

unset($crTransactions);
Expand Down Expand Up @@ -237,6 +245,10 @@
$balancesObj = $balancesHandler->create();
$form = $balancesObj->getFormBalances('balances.php');
$GLOBALS['xoopsTpl']->assign('form', $form->render());

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCES, 'link' => 'balances.php?op=list'];
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCE_SUBMIT];
break;
/*
case 'edit':
Expand Down Expand Up @@ -292,9 +304,6 @@
*/
}

// Breadcrumbs
$xoBreadcrumbs[] = ['title' => \_MA_WGSIMPLEACC_BALANCES];

// Keywords
wgsimpleaccMetaKeywords($helper->getConfig('keywords') . ', ' . \implode(',', $keywords));
unset($keywords);
Expand Down
2 changes: 1 addition & 1 deletion class/Accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getFormAccounts($action = false, $admin = false)
$action = $_SERVER['REQUEST_URI'];
}
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_ACCOUNT_ADD) : \sprintf(\_AM_WGSIMPLEACC_ACCOUNT_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_ACCOUNT_ADD) : \sprintf(\_MA_WGSIMPLEACC_ACCOUNT_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down
2 changes: 1 addition & 1 deletion class/Allocations.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getFormAllocations($action = false, $admin = false)
$action = $_SERVER['REQUEST_URI'];
}
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_ALLOCATION_ADD) : \sprintf(\_AM_WGSIMPLEACC_ALLOCATION_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_ALLOCATION_ADD) : \sprintf(\_MA_WGSIMPLEACC_ALLOCATION_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down
2 changes: 1 addition & 1 deletion class/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getFormAssets($action = false, $admin = false)
$action = $_SERVER['REQUEST_URI'];
}
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_ASSET_ADD) : \sprintf(\_AM_WGSIMPLEACC_ASSET_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_ASSET_ADD) : \sprintf(\_MA_WGSIMPLEACC_ASSET_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down
4 changes: 1 addition & 3 deletions class/AssetsHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@ public function getCurrentAssetsValues()

$helper = \XoopsModules\Wgsimpleacc\Helper::getInstance();
$assetsHandler = $helper->getHandler('Assets');
$balancesHandler = $helper->getHandler('Balances');

$ret = [];

$sql = 'SELECT `tra_asid`, Sum(`tra_amountin`) AS Sum_tra_amountin, Sum(`tra_amountout`) AS Sum_tra_amountout ';
$sql .= 'FROM ' . $xoopsDB->prefix('wgsimpleacc_transactions') . ' ';
$sql .= 'WHERE `tra_status` > ' . Constants::STATUS_SUBMITTED . ' ';
$sql .= 'GROUP BY ' . $xoopsDB->prefix('wgsimpleacc_transactions') . '.tra_asid ';
$sql .= 'ORDER BY ' . $xoopsDB->prefix('wgsimpleacc_transactions') . '.tra_asid;';
$result = $xoopsDB->query($sql);
Expand Down
6 changes: 3 additions & 3 deletions class/Balances.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getFormBalances($action = false, $admin = false)
$dtime = \DateTime::createFromFormat('Y-m-d', (date('Y') - 1) . '-12-31');
$dateTo = $dtime->getTimestamp();
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_BALANCE_ADD) : \sprintf(\_AM_WGSIMPLEACC_BALANCE_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_BALANCE_ADD) : \sprintf(\_MA_WGSIMPLEACC_BALANCE_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down Expand Up @@ -126,8 +126,8 @@ public function getFormBalances($action = false, $admin = false)
$form->addElement(new \XoopsFormText(\_MA_WGSIMPLEACC_BALANCE_AMOUNTEND, 'bal_amountend', 20, 150, $balAmountEnd), true);
// Form Select Status
$balStatusSelect = new \XoopsFormSelect(\_MA_WGSIMPLEACC_BALANCE_STATUS, 'bal_status', $balStatus);
//$balStatusSelect->addOption(Constants::STATUS_CREATED, \_AM_WGSIMPLEACC_STATUS_CREATED);
$balStatusSelect->addOption(Constants::STATUS_APPROVED, \_AM_WGSIMPLEACC_STATUS_APPROVED);
//$balStatusSelect->addOption(Constants::STATUS_CREATED, \_MA_WGSIMPLEACC_STATUS_CREATED);
$balStatusSelect->addOption(Constants::STATUS_APPROVED, \_MA_WGSIMPLEACC_STATUS_APPROVED);
$form->addElement($balStatusSelect);
// Form Text Date Select balDatecreated
$balDatecreated = $this->isNew() ?: $this->getVar('bal_datecreated');
Expand Down
12 changes: 6 additions & 6 deletions class/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ interface Constants

// Constants for status
public const STATUS_NONE = 0;
public const STATUS_OFFLINE = 1;
public const STATUS_SUBMITTED = 2;
public const STATUS_APPROVED = 3;
public const STATUS_BROKEN = 4;
public const STATUS_CREATED = 5;
public const STATUS_LOCKED = 6;
public const STATUS_CREATED = 1;
public const STATUS_BROKEN = 2;
public const STATUS_OFFLINE = 3;
public const STATUS_SUBMITTED = 4;
public const STATUS_APPROVED = 7;
public const STATUS_LOCKED = 9;

// Constants for permissions
public const PERM_GLOBAL_NONE = 0;
Expand Down
2 changes: 1 addition & 1 deletion class/Outtemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getFormOuttemplates($action = false)
}
$isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid());
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_OUTTEMPLATE_ADD) : \sprintf(\_AM_WGSIMPLEACC_OUTTEMPLATE_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_OUTTEMPLATE_ADD) : \sprintf(\_MA_WGSIMPLEACC_OUTTEMPLATE_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down
25 changes: 15 additions & 10 deletions class/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,18 @@ public function getFormTransactions($action = false, $admin = false, $type = 0,
$traAmountin = $this->isNew() ? $default0 : Utility::FloatToString($this->getVar('tra_amountin'));
// Form Text traAmountout
$traAmountout = $this->isNew() ? $default0 : Utility::FloatToString($this->getVar('tra_amountout'));
if (Constants::CLASS_INCOME == $type || Constants::CLASS_INCOME == $traClass || Constants::CLASS_BOTH == $type) {
if ($admin) {
$form->addElement(new \XoopsFormText(\_MA_WGSIMPLEACC_TRANSACTION_AMOUNTIN, 'tra_amountin', 20, 150, $traAmountin));
$form->addElement(new \XoopsFormHidden('tra_amountout', 0));
}
if (Constants::CLASS_EXPENSES == $type || Constants::CLASS_EXPENSES == $traClass || Constants::CLASS_BOTH == $type) {
$form->addElement(new \XoopsFormText(\_MA_WGSIMPLEACC_TRANSACTION_AMOUNTOUT, 'tra_amountout', 20, 150, $traAmountout));
$form->addElement(new \XoopsFormHidden('tra_amountin', 0));
} else {
if (Constants::CLASS_INCOME == $type || Constants::CLASS_INCOME == $traClass || Constants::CLASS_BOTH == $type) {
$form->addElement(new \XoopsFormText(\_MA_WGSIMPLEACC_TRANSACTION_AMOUNTIN, 'tra_amountin', 20, 150, $traAmountin));
$form->addElement(new \XoopsFormHidden('tra_amountout', 0));
}
if (Constants::CLASS_EXPENSES == $type || Constants::CLASS_EXPENSES == $traClass || Constants::CLASS_BOTH == $type) {
$form->addElement(new \XoopsFormText(\_MA_WGSIMPLEACC_TRANSACTION_AMOUNTOUT, 'tra_amountout', 20, 150, $traAmountout));
$form->addElement(new \XoopsFormHidden('tra_amountin', 0));
}
}
if ($helper->getConfig('use_taxes')) {
// Form Table taxes
Expand Down Expand Up @@ -261,11 +266,11 @@ public function getFormTransactions($action = false, $admin = false, $type = 0,
if ($admin) {
// Form Select Status traStatus
$traStatusSelect = new \XoopsFormSelect(\_MA_WGSIMPLEACC_TRANSACTION_STATUS, 'tra_status', $traStatus);
$traStatusSelect->addOption(Constants::STATUS_NONE, \_AM_WGSIMPLEACC_STATUS_NONE);
$traStatusSelect->addOption(Constants::STATUS_OFFLINE, \_AM_WGSIMPLEACC_STATUS_OFFLINE);
$traStatusSelect->addOption(Constants::STATUS_SUBMITTED, \_AM_WGSIMPLEACC_STATUS_SUBMITTED);
$traStatusSelect->addOption(Constants::STATUS_APPROVED, \_AM_WGSIMPLEACC_STATUS_APPROVED);
$traStatusSelect->addOption(Constants::STATUS_LOCKED, \_AM_WGSIMPLEACC_STATUS_LOCKED);
$traStatusSelect->addOption(Constants::STATUS_NONE, \_MA_WGSIMPLEACC_STATUS_NONE);
$traStatusSelect->addOption(Constants::STATUS_OFFLINE, \_MA_WGSIMPLEACC_STATUS_OFFLINE);
$traStatusSelect->addOption(Constants::STATUS_SUBMITTED, \_MA_WGSIMPLEACC_STATUS_SUBMITTED);
$traStatusSelect->addOption(Constants::STATUS_APPROVED, \_MA_WGSIMPLEACC_STATUS_APPROVED);
$traStatusSelect->addOption(Constants::STATUS_LOCKED, \_MA_WGSIMPLEACC_STATUS_LOCKED);
$form->addElement($traStatusSelect);
// Form Select traClass
$traClassSelect = new \XoopsFormSelect(\_MA_WGSIMPLEACC_TRANSACTION_CLASS, 'tra_class', $traClass);
Expand Down
2 changes: 1 addition & 1 deletion class/Tratemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getFormTratemplates($action = false)
}
$isAdmin = $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid());
// Title
$title = $this->isNew() ? \sprintf(\_AM_WGSIMPLEACC_TRATEMPLATE_ADD) : \sprintf(\_AM_WGSIMPLEACC_TRATEMPLATE_EDIT);
$title = $this->isNew() ? \sprintf(\_MA_WGSIMPLEACC_TRATEMPLATE_ADD) : \sprintf(\_MA_WGSIMPLEACC_TRATEMPLATE_EDIT);
// Get Theme Form
\xoops_load('XoopsFormLoader');
$form = new \XoopsThemeForm($title, 'form', $action, 'post', true);
Expand Down
10 changes: 5 additions & 5 deletions class/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ public static function getStatusText($status)
switch ($status) {
case Constants::STATUS_NONE:
default:
$status_text = \_AM_WGSIMPLEACC_STATUS_NONE;
$status_text = \_MA_WGSIMPLEACC_STATUS_NONE;
break;
case Constants::STATUS_OFFLINE:
$status_text = \_AM_WGSIMPLEACC_STATUS_OFFLINE;
$status_text = \_MA_WGSIMPLEACC_STATUS_OFFLINE;
break;
case Constants::STATUS_SUBMITTED:
$status_text = \_AM_WGSIMPLEACC_STATUS_SUBMITTED;
$status_text = \_MA_WGSIMPLEACC_STATUS_SUBMITTED;
break;
case Constants::STATUS_APPROVED:
$status_text = \_AM_WGSIMPLEACC_STATUS_APPROVED;
$status_text = \_MA_WGSIMPLEACC_STATUS_APPROVED;
break;
case Constants::STATUS_LOCKED:
$status_text = \_AM_WGSIMPLEACC_STATUS_LOCKED;
$status_text = \_MA_WGSIMPLEACC_STATUS_LOCKED;
break;
}

Expand Down
Loading

0 comments on commit dd5d089

Please sign in to comment.