Lines:
1 to 100 of 207
<?php /** * Display the Simple Payments Form. * * @package Jetpack */ ?> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"> <?php esc_html_e( 'Widget Title', 'jetpack' ); ?> </label> <input type="text" class="widefat jetpack-simple-payments-widget-title" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" /> </p> <p class="jetpack-simple-payments-products-fieldset" <?php if ( empty( $product_posts ) ) { echo 'style="display:none;"'; } ?>> <label for="<?php echo esc_attr( $this->get_field_id( 'product_post_id' ) ); ?>"> <?php esc_html_e( 'Select a Simple Payments Button:', 'jetpack' ); ?> </label> <select class="widefat jetpack-simple-payments-products" id="<?php echo esc_attr( $this->get_field_id( 'product_post_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'product_post_id' ) ); ?>"> <?php foreach ( $product_posts as $product_post ) { ?> <option value="<?php echo esc_attr( $product_post->ID ); ?>" <?php selected( (int) $instance['product_post_id'], $product_post->ID ); ?>> <?php echo esc_attr( get_the_title( $product_post ) ); ?> </option> <?php } ?> </select> </p> <?php if ( is_customize_preview() ) { ?> <p class="jetpack-simple-payments-products-warning" <?php if ( ! empty( $product_posts ) ) { echo 'style="display:none;"'; } ?>> <?php esc_html_e( "Looks like you don't have any products. You can create one using the Add New button below.", 'jetpack' ); ?> </p> <p> <div class="alignleft"> <button class="button jetpack-simple-payments-edit-product" <?php disabled( empty( $product_posts ), true ); ?>> <?php esc_html_e( 'Edit Selected', 'jetpack' ); ?> </button> </div> <div class="alignright"> <button class="button jetpack-simple-payments-add-product"><?php esc_html_e( 'Add New', 'jetpack' ); ?></button> </div> <br class="clear"> </p> <hr /> <div class="jetpack-simple-payments-form" style="display: none;"> <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'form_action' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'form_action' ) ); ?>" value="<?php echo esc_attr( $instance['form_action'] ); ?>" class="jetpack-simple-payments-form-action" /> <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'form_product_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'form_product_id' ) ); ?>" value="<?php echo esc_attr( $instance['form_product_id'] ); ?>" class="jetpack-simple-payments-form-product-id" /> <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'form_product_image_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'form_product_image_id' ) ); ?>" value="<?php echo esc_attr( $instance['form_product_image_id'] ); ?>" class="jetpack-simple-payments-form-image-id" /> <input type="hidden" id="<?php echo esc_attr( $this->get_field_id( 'form_product_image_src' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'form_product_image_src' ) ); ?>" value="<?php echo esc_attr( $instance['form_product_image_src'] ); ?>" class="jetpack-simple-payments-form-image-src" /> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'form_product_title' ) ); ?>"> <?php esc_html_e( 'What is this payment for?', 'jetpack' ); ?> </label> <input type="text" class="widefat field-title jetpack-simple-payments-form-product-title" id="<?php echo esc_attr( $this->get_field_id( 'form_product_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'form_product_title' ) ); ?>" value="<?php echo esc_attr( $instance['form_product_title'] ); ?>" /> <br /> <small> <?php esc_html_e( 'For example: event tickets, charitable donations, training courses, coaching fees, etc.', 'jetpack' ); ?> </small> </p> <div class="jetpack-simple-payments-image-fieldset"> <label><?php esc_html_e( 'Product image', 'jetpack' ); ?></label> <div class="placeholder" <?php if ( ! empty( $instance['form_product_image_id'] ) ) echo 'style="display:none;"'; ?>> <?php esc_html_e( 'Select an image', 'jetpack' ); ?> </div> <div class="jetpack-simple-payments-image" <?php if ( empty( $instance['form_product_image_id'] ) ) echo 'style="display:none;"'; ?>> <img src="<?php echo esc_url( $instance['form_product_image_src'] ); ?>" /> <button class="button jetpack-simple-payments-remove-image"><?php esc_html_e( 'Remove image', 'jetpack' ); ?></button> </div> </div>