<?php
    $options = null;
    foreach ($this->yarpp->get_templates() as $template) {
        $options .= '<option value="'.esc_attr($template['basename']).'"'.selected($template['basename'], $chosen_template, false);
        foreach ($template as $key => $value) {
            $options .= ' data-'.$key.'="'.esc_attr($value).'"';
        }
        $options .= '>'.esc_html($template['name']).'</option>';
    }
?>

        <div class="yarpp_form_row yarpp_form_template_file <?php echo $class ?>">
            <div class="yarpp_form_label">
            <?php _e('Template file:', 'yarpp') ?>
            </div>
        <div>

        <select name="<?php echo $pre ?>template_file" id="<?php echo $pre ?>template_file">
            <?php echo $options ?>
        </select>

        <p class="template_file_wrap">
            <span id="<?php echo $pre ?>template_file"></span>
        </p>

        <p class="template_author_wrap">
            <?php _e( 'Author:' ) ?> <span id="<?php echo $pre ?>template_author"></span>
        </p>

        <p class="template_description_wrap">
            <span id="<?php echo $pre ?>template_description"></span>
        </p>
    </div>
</div>