コード例 #1
0
ファイル: avalara.php プロジェクト: sam-akopyan/hamradio
    function plgVmOnDisplayEdit(&$calc, &$html)
    {
        $html .= '<fieldset>
	<legend>' . vmText::_('VMCALCULATION_AVALARA') . '</legend>
	<table class="admintable">';
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ACTIVATED', 'activated', $calc->activated);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_COMPANY_CODE', 'company_code', $calc->company_code);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_ACCOUNT', 'account', $calc->account);
        $html .= VmHTML::row('input', 'VMCALCULATION_AVALARA_LICENSE', 'license', $calc->license);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_COMMITT', 'committ', $calc->committ);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ONLYCART', 'only_cart', $calc->only_cart);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_ACCRUAL', 'accrual', $calc->accrual);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_DEV', 'dev', $calc->dev);
        $html .= VmHTML::row('checkbox', 'VMCALCULATION_AVALARA_PREVCHECKOUT_AD_INVALID', 'prevCheckoutAddInv', $calc->prevCheckoutAddInv);
        $label = 'VMCALCULATION_AVALARA_VADDRESS';
        $lang = JFactory::getLanguage();
        $label = $lang->hasKey($label . '_TIP') ? '<span class="hasTip" title="' . vmText::_($label . '_TIP') . '">' . vmText::_($label) . '</span>' : vmText::_($label);
        $html .= '
            <tr>
                <td class="key">
                    ' . $label . '
                </td>
                <td>
                    ' . shopfunctionsF::renderCountryList($calc->avatax_virtuemart_country_id, TRUE, array(), 'avatax_') . '
                </td>';
        /*   $countriesList = ShopFunctions::renderCountryList($calc->calc_countries,True);
                        $this->assignRef('countriesList', $countriesList);
                        $statesList = ShopFunctions::renderStateList($calc->virtuemart_state_ids,'', True);
                        $this->assignRef('statesList', $statesList);
        
                    $label = 'VMCALCULATION_AVALARA_VADDRESS';
                    $lang =JFactory::getLanguage();
                    $label = $lang->hasKey($label.'_TIP') ? '<span class="hasTip" title="'.vmText::_($label.'_TIP').'">'.vmText::_($label).'</span>' : cmText::_($label) ;
                 $html .= '
        			<td>
        				'.shopfunctions::renderStateList($calc->avatax_virtuemart_state_id,'avatax_',TRUE).'
        			</td> */
        $html .= '</tr>';
        //$html .= VmHTML::row('checkbox','VMCALCULATION_AVALARA_VADDRESS','vAddress',$calc->vAddress);
        //	$html .= VmHTML::row('checkbox','VMCALCULATION_ISTRAXX_AVALARA_TRACE','trace',$calc->trace);
        $html .= '</table>';
        if ($calc->activated) {
            $html .= $this->ping($calc);
        }
        $html .= vmText::_('VMCALCULATION_AVALARA_MANUAL') . '</fieldset>';
        return TRUE;
    }