<?php

/**
* @version 2.7.15
* @package Joomla 1.7/2.5
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

            $row->config['pay_later_options'] = (isset($row->config['pay_later_options']) && is_array($row->config['pay_later_options']))?$row->config['pay_later_options']:array();
			$row = $this->row;
			$paylater = $this->getModel('paylater');
			$config = $this->getModel('config');
            $options=DtHtml::options($paylater->getOptions());
			$selectedOptions=DtHtml::options((array)$row->config['pay_later_options']);

		?>

                <tr valign="middle" class="pay_later"><td align="left" class="dt_heading" colspan="4"><?php echo JText::_( 'DT_PAYLATER_OFFLINE' ); ?></td></tr>

				<tr align="center" class="pay_later" valign="middle">

                  <td align="left" valign="top"><strong><?php echo JText::_( 'DT_PAY_LATER_OPTIONS' ) ;?>:</strong></td>

							     <td>
                                  
                                   <a href="#" id="addmore">Add more</a>
                                     <br/>
                                     <span class="container">
                                     <?php
                                        echo     DtHtml::paylatercheckboxlist('data[config][pay_later_options]',$paylater->options,isset($row->config['pay_later_options'])?$row->config['pay_later_options']:array());
									  ?>
                                     </span>
                                    
                                   </td>
								  <td><?php echo JHTML::tooltip((JText::_( 'DT_PAY_LATER_OPTIONS_HELP' )), '', 'tooltip.png', '', ''); ?> </td>
								  
								  <td valign="top"><?php echo JText::_( 'DT_NOTES_PAYLATER' ) ;?></td>

				</tr>
                  <tr class="pay_later" >
                     		<td valign="top"><strong><?php echo JText::_( 'DT_PAYLATER_FIELD' );?>:</strong></td>

				     		<td valign="top">
                     <?php
					   $mfield = $this->getModel('field');

					   $tfield = $this->getModel('field')->table;
                       $list = $tfield->optionslist(' type = 1 or type=4 or type =3 ');
					   $options=DtHtml::options($list,JText::_('DT_SELECT_FIELD'));

  					   echo JHTML::_('select.genericlist',$options,"data[config][paylater_field]",'','value','text',$row->config['paylater_field']);
					 
					 ?>
                     		 <br />

                				<span id="paylater_parentoptions">

                				</span>

								</td>

								<td valign="top"><?php echo JHTML::tooltip(JText::_( 'DT_PAYLATER_FIELD_HELP' ), '', 'tooltip.png', '', '');?></td>

						</tr>