| @@ -1,22 +1,36 @@ | ||
| 1 | 1 | <div class="hf-small-margin"> |
| 2 | - <div id="hf-field-builder"></div> | |
| 2 | + <div id="hf-field-builder"></div> | |
| 3 | + <?php if ( ! defined( 'HF_PREMIUM_VERSION' ) ) : ?> | |
| 4 | + <p class="hf-premium"> | |
| 5 | + <?php echo sprintf( __('Add a File Upload field with <a href="%s">HTML Forms Premium</a>', 'html-forms' ), 'https://htmlformsplugin.com/premium/#utm_source=wp-plugin&utm_medium=html-forms&utm_campaign=fields-tab' ); ?>. | |
| 6 | + </p> | |
| 7 | + <?php endif; ?> | |
| 3 | 8 | </div> |
| 4 | 9 | |
| 5 | 10 | <div class="hf-small-margin"> |
| 6 | - | |
| 7 | 11 | <div class="hf-row"> |
| 8 | 12 | <div class="hf-col" style="min-width: 600px;"> |
| 9 | - <h4 style="margin-bottom: 0;"><label for="hf-form-editor"><?php _e( 'Form code', 'html-forms' ); ?></label></h4> | |
| 10 | - <textarea id="hf-form-editor" class="widefat" name="form[markup]" cols="160" rows="20" autocomplete="false" autocorrect="false" autocapitalize="false" spellcheck="false"><?php echo htmlspecialchars( $form->markup, ENT_QUOTES, get_option( 'blog_charset' ) ); ?></textarea> | |
| 11 | - <?php submit_button(); ?> | |
| 13 | + <h4 style="margin-bottom: 8px;"> | |
| 14 | + <label for="hf-form-editor"> | |
| 15 | + <?php _e('Form Code', 'html-forms'); ?> | |
| 16 | + <a id="hf-show-form-preview" href="#hf-form-editor"><?php _e('Show Form Preview', 'html-forms'); ?></a> | |
| 17 | + </label> | |
| 18 | + </h4> | |
| 19 | + <textarea id="hf-form-editor" class="widefat" name="form[markup]" cols="160" rows="20" autocomplete="false" autocorrect="false" autocapitalize="false" spellcheck="false"><?php echo htmlspecialchars($form->markup, ENT_QUOTES, get_option('blog_charset')); ?></textarea> | |
| 20 | + <?php submit_button(); ?> | |
| 12 | 21 | </div> |
| 13 | - <div class="hf-col" style="min-width: 400px;"> | |
| 14 | - <h4 style="margin-bottom: 0;"><label><?php _e( 'Form preview', 'html-forms' ); ?> <span class="dashicons dashicons-editor-help hf-tooltip" title="<?php esc_attr_e( 'The form may look slightly different than this when shown in a post, page or widget area.', 'html-forms' ); ?>"></span></label></h4> | |
| 15 | - <iframe id="hf-form-preview" src="<?php echo esc_attr( $form_preview_url ); ?>"></iframe> | |
| 22 | + <div id="hf-form-preview-container" class="hf-col" style="min-width: 400px;"> | |
| 23 | + <h4 style="margin-bottom: 8px;"> | |
| 24 | + <labe lfor="hf-form-preview"> | |
| 25 | + <?php _e('Form Preview', 'html-forms'); ?> | |
| 26 | + </label> | |
| 27 | + <a id="hf-hide-form-preview" href="#hf-form-editor"><?php _e('Hide Form Preview', 'html-forms'); ?></a> | |
| 28 | + </h4> | |
| 29 | + <iframe id="hf-form-preview" src="<?php echo esc_attr($form_preview_url); ?>"></iframe> | |
| 30 | + <p class="description"><?php esc_html_e('The form may look slightly different than this when shown in a post, page or widget area.', 'html-forms'); ?></p> | |
| 16 | 31 | </div> |
| 17 | 32 | </div> |
| 18 | - | |
| 19 | 33 | </div> |
| 20 | 34 | |
| 21 | -<input type="hidden" id="hf-required-fields" name="form[settings][required_fields]" value="<?php echo esc_attr( $form->settings['required_fields'] ); ?>" /> | |
| 22 | -<input type="hidden" id="hf-email-fields" name="form[settings][email_fields]" value="<?php echo esc_attr( $form->settings['email_fields'] ); ?>" /> | |
| 35 | +<input type="hidden" id="hf-required-fields" name="form[settings][required_fields]" value="<?php echo esc_attr($form->settings['required_fields']); ?>" /> | |
| 36 | +<input type="hidden" id="hf-email-fields" name="form[settings][email_fields]" value="<?php echo esc_attr($form->settings['email_fields']); ?>" /> | |