_sDefaultSortingOrder = 'DESC'; $this->_bWithdraw = $this->_oModule->_oConfig->isWithdraw(); } public function performActionWithdrawConfirm() { if(!$this->_bWithdraw) return $this->_bIsApi ? [] : echoJson([]); $sAction = 'withdraw_confirm'; $iId = $this->_getId(); if(!$iId) return $this->_bIsApi ? [] : echoJson([]); $aResult = $this->_oModule->processWithdrawConfirm($this->_iUserId, $iId); $aResult = $this->_onPerformAction($aResult); return $this->_bIsApi ? $aResult : echoJson($aResult); } protected function _getActionWithdrawConfirm($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { if(!$this->_bWithdraw || $aRow['status'] != BX_CREDITS_WITHDRAWAL_STATUS_REQUESTED) return $this->_bIsApi ? [] : ''; return parent::_getActionDefault($sType, $sKey, $a, false, $isDisabled, $aRow); } protected function _getCellProfileId($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault($this->_getProfile($mixedValue), $sKey, $aField, $aRow); } protected function _getCellPerformerId($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(!empty($mixedValue) ? $this->_getProfile($mixedValue) : '', $sKey, $aField, $aRow); } protected function _getCellAmount($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault($this->_oModule->convertC2S($mixedValue), $sKey, $aField, $aRow); } protected function _getCellOrder($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow); } protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(bx_time_js($mixedValue, BX_FORMAT_DATE, true), $sKey, $aField, $aRow); } protected function _getCellConfirmed($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(!empty($mixedValue) ? bx_time_js($mixedValue, BX_FORMAT_DATE, true) : '', $sKey, $aField, $aRow); } protected function _getCellStatus($mixedValue, $sKey, $aField, $aRow) { return parent::_getCellDefault(_t('_bx_credits_txt_withdrawal_status_' . $mixedValue), $sKey, $aField, $aRow); } protected function _addJsCss() { parent::_addJsCss(); $this->_oModule->_oTemplate->addJs([ 'jquery.form.min.js', 'withdraw.js' ]); $this->_oModule->_oTemplate->addCss([ 'main.css', 'withdraw.css' ]); $oForm = new BxTemplFormView([]); $oForm->addCssJs(); } } /** @} */