<?php defined('ABSPATH') or die('No script kiddies please!'); ?>

<div class="wpwab-content-wrap">
    <div class="wpwab-field-wrap">
        <label><?php _e('Template Layout', wpwab_TD); ?></label>
        <div class="wpwab-field wpwab-border-design">
            <select name="wpwab_button_template" id="wpwab-button-template" >
                <?php for ($k = 1; $k <= 18; $k ++) { ?>
                    <option id="wpwab-temp-<?php echo $k; ?>" value="template-<?php echo $k; ?>"><?php _e('Template ', wpwab_TD) ?><?php echo $k; ?></option>
                <?php } ?>    </select>
            <div class="menu-template">
                <div class="wpwab-border-design">
                    <img src="<?php echo wpwab_IMG_DIR . '/button/' . 'template-1.jpg' ?>"/>
                </div>
            </div>
            <div class="wpwab-grid-demo wpwab-preview-image">
                <?php
                for ($cnt = 1; $cnt <= 18; $cnt ++) {
                    if (isset($wpwab_settings['wpwab_button_template'])) {
                        $option_value = $wpwab_settings['wpwab_button_template'];
                        $exploed_array = explode('-', $option_value);
                        $cnt_num = $exploed_array[1];
                        if ($cnt != $cnt_num) {
                            $style = "style='display:none;'";
                        } else {
                            $style = '';
                        }
                    }
                    ?>
                    <div class="wpwab-grid-common" id="wpwab-grid-demo-<?php echo $cnt; ?>" <?php if (isset($style)) echo $style; ?> >
                        <div class="wpwab-border-design">
                            <img src="<?php echo wpwab_IMG_DIR . '/button/' . 'template-' . $cnt . '.jpg' ?>"/>
                        </div>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
    <div class="wpwab-field-wrap" >
        <label for="wpwab_button_text_value"><?php _e( 'Button Description Text', wpwab_TD ); ?></label>
        <div class="wpwab-field">
            <input type="text" name="button_description" id="wpwab_button_description_value" value="" placeholder="Insert Button description"/>
            <label for="wpwab_button_description_value"></label>
            <p class="description"><?php _e('Please add description for the button text. Note: This description will only come in affect for templates 12, 13, 15 and 18 respectively if the button text is enabled.', wpwab_TD) ?></p>
        </div>
    </div>
</div>