<?php echo $this->getLayout()->createBlock('core/html_calendar')->setTemplate('page/js/calendar.phtml')->toHtml(); ?>
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
    <li>
        <?php if ($this->getMethodCode() == 'msp_afterpay') { ?>

            <label for="gender" style="width:200px!important;"><?php echo $this->__('Titel') . ':'; ?></label>
            <input type="radio" name="payment[salutation]" value="Mr"<?php echo ($this->getGender() == 'male') ? 'checked' : ''; ?>>   <?php echo $this->__('Heer'); ?>
            <input type="radio" name="payment[salutation]" value="Mrs"<?php echo ($this->getGender() == 'female') ? 'checked' : ''; ?>>  <?php echo $this->__('Mevrouw'); ?>
            <input type="radio" name="payment[salutation]" value="Miss"> <?php echo $this->__('Mejuffrouw'); ?>
            <br/>

            <label for="birthday" 			    style="width:200px!important;">Geboortedatum: </label>
            <input name='payment[birthday]' value="<?php echo $this->getBirthday(); ?>" id="msp_afterpay_birthday" placeholder='DD-MM-YYYY'  readonly />
            <span id="msp_afterpay_birthday_trig">
                <img style="display: inline;" src="<?php echo $this->getJsUrl('calendar/img.gif') ?>" class="v-middle"/>
            </span>
            <br/>
            <label for="phonenumber" 		style="width:200px!important;">Telefoonnummer:</label>
            <input name='payment[phonenumber]' 		value="<?php echo $this->getPhonenumber(); ?>"	id="phonenumber"/>

        <?php } ?>
    </li>
</ul>
<script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function() {
        Calendar.setup({
            inputField  : 'msp_afterpay_birthday',
            ifFormat    : '%d-%m-%Y',
            button      : 'msp_afterpay_birthday_trig',
            align       : 'Bl',
            onSelect: function(dateText,selectedDate) {
                jQuery('#msp_afterpay_birthday').val(selectedDate);
            }
        });
        jQuery(document).on('click','#msp_afterpay_birthday', function() {
            jQuery('#msp_afterpay_birthday_trig').trigger('click');
        });
    });
    //]]>
</script>
