コード例 #1
0
        protected function _toHtml()
        {
            $sMainHtml = parent::_toHtml();
            $btnUrl = $this->getUrl('aitindividpromo/index/sendmail/id/' . $thisId, array('_current' => true));
            $sDivCustomer = '
<style>


DIV.latest_clip_vertical div {
	height: 1px;
	padding: 0px;

	margin-top: 1px;	
	margin-bottom: 2px;	
	
	background:none;
	clear:both;
	line-height:0px;
	font-size:0px;
	border-bottom:1px solid #CFCFCF;
}

a.a_del {
}
</style>

<div class="latest_clip_vertical" id="customer_ids_div" style=" width:280px;
    height: 220px;
    overflow: auto; 
    overflow-y: scroll; 
    overflow-x: hidden;
	padding-top: 1px;	
   
    border: 1px solid #BCBCBC;
    ">
</div>  

<div align=center>
    <div id="customer_search_add">
        <br><a href="#" onClick="showCustomerSearch(true); return false;">' . Mage::helper('salesrule')->__('Add Customers') . '</a>
		
		<button style="" onclick="setLocation(\'' . $btnUrl . '\')" class="scalable save" type="button" title="Send Mail to Customers"><span>Send Mail to Customers</span></button>
		
    </div>
    <div id="customer_search_hide">
        <br><a href="#" onClick="showCustomerSearch(false); return false;">' . Mage::helper('salesrule')->__('Hide Customers') . '</a>
		
		<button style="" onclick="setLocation(\'' . $btnUrl . '\')" class="scalable save" type="button" title="Send Mail to Customers"><span>Send Mail to Customers</span></button>
    </div>
</div>

        ';
            $oBlock = $this->getLayout()->createBlock('aitindividpromo/customers');
            $sIndividHtml = '<td class="label">' . Mage::helper('salesrule')->__('Individual Customers') . '</td>
                        <td class="value">' . $sDivCustomer . '<br></td>
                        <td id="note_customer_group_ids"></td><tr><td></td><td></td><td width="100%"></td></tr><tr id="customer_search_tr"><td colspan="3">' . $oBlock->getHtml() . '</td></tr>';
            $sMainHtml = str_replace('<td colspan="2" class="hidden"><input id="rule_replace_placeholder" name="replace_placeholder" value="" type="hidden"/></td>', $sIndividHtml, $sMainHtml);
            return $sMainHtml . $this->_getAppendHtml();
        }