<?php
/**
 * Popup Button Form
 *
 * Form for prequal widget.
 *
 * @since   7.0
 *
 * @package WPrequal
 */

namespace WPrequal;

if ( ! defined( 'ABSPATH' ) ) {
	die( 'Access denied!!' );
} ?>

<p><label for="button-text"><?php esc_html_e( 'Button Text', 'wprequal' ); ?></label>
<p><input type="text" class="widefat" value="<?php echo esc_attr( $text['value'] ); ?>" id="button-text" name="<?php echo esc_attr( $text['name'] ); ?>"></p>

<p><label for="size"><?php esc_html_e( 'Survey Form', 'wprequal' ); ?></label>
<p><?php wp_dropdown_pages( [
        'post_type' => 'wpq_survey_form',
        'name'      => esc_attr( $args_name ),
        'class'     => 'post_id widefat',
        'id'        => 'post_id',
        'selected'  => absint( $post_id )
    ] ); ?></p>

<p><label for="button-align"><?php esc_html_e( 'Align Button', 'wprequal' ); ?></label>
<p>
	<select class="widefat" value="<?php echo esc_attr( $align['value'] ); ?>" id="button-align" name="<?php echo esc_attr( $align['name'] ); ?>">

		<?php foreach ( $align['options'] as $key => $label ) { ?>
			<?php $selected = $key === $align['value'] ? 'selected' : ''; ?>
			<option value="<?php echo esc_attr( $key ); ?>" <?php echo esc_attr( $selected ); ?>><?php echo esc_html( $label ); ?></option>
		<?php } ?>
	</select>
</p>