PluginProbe
HTML Forms – Simple WordPress Forms Plugin / 1.3.30
HTML Forms – Simple WordPress Forms Plugin v1.3.30
1.7.0 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.14 1.3.15 1.3.16 All 67 releases
html-forms / views / page-edit-form.php

page-edit-form.php in HTML Forms – Simple WordPress Forms Plugin 1.3.30, at views/page-edit-form.php

69 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined( 'ABSPATH' ) or exit;
2
3 $tabs = hf_get_admin_tabs($form);
4
5 ?>
6 <script>document.title = 'Edit form' + ' - ' + document.title;</script>
7 <div class="wrap hf">
8
9 <p class="breadcrumbs">
10 <span class="prefix"><?php echo __( 'You are here: ', 'html-forms' ); ?></span>
11 <a href="<?php echo admin_url( 'admin.php?page=html-forms' ); ?>">HTML Forms</a> &rsaquo;
12 <span class="current-crumb"><strong><?php _e( 'Edit form', 'html-forms' ); ?></strong></span>
13 </p>
14
15 <h1 class="page-title"><?php _e( 'Edit form', 'html-forms' ); ?></h1>
16
17 <?php if ( ! empty( $_GET['saved'] ) ) {
18 echo '<div class="notice notice-success"><p>' . __( 'Form updated.', 'html-forms' ) . '</p></div>';
19 } ?>
20
21 <form method="post">
22 <input type="hidden" name="_hf_admin_action" value="save_form" />
23 <input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce('_hf_admin_action') ); ?>" />
24 <input type="hidden" name="form_id" value="<?php echo esc_attr( $form->ID ); ?>" />
25 <input type="submit" style="display: none; " />
26
27 <div id="titlediv">
28 <div id="titlewrap">
29 <label for="title"><?php _e( 'Form title', 'html-forms' ); ?></label>
30 <input type="text" name="form[title]" size="30" value="<?php echo esc_attr( $form->title ); ?>" id="title" spellcheck="true" autocomplete="off" placeholder="<?php echo __( "Enter the title of your form", 'html-forms' ); ?>" style="line-height: initial;" >
31 </div>
32 <div class="inside" style="margin-top: 3px;">
33 <div class="hf-tiny-margin hide-if-no-js">
34 <strong>Slug:</strong> <input type="text" id="form-slug-input" name="form[slug]" value="<?php echo esc_attr( $form->slug ); ?>" readonly /> &lrm;<button type="button" class="button button-small" onclick="document.getElementById('form-slug-input').removeAttribute('readonly');" aria-label="<?php _e( 'Edit slug', 'html-forms' ); ?>"><?php _e( 'Edit', 'html-forms' ); ?></button>
35 </div>
36 <div class="hf-tiny-margin">
37 <label for="shortcode"><?php _e( 'Copy this shortcode and paste it into your post, page, or text widget content:', 'html-forms' ); ?></label><br />
38 <input id="shortcode" type="text" class="regular-text" value="<?php echo esc_attr( sprintf( '[hf_form slug="%s"]', $form->slug ) ); ?>" readonly onclick="this.select()">
39 </div>
40 </div>
41 </div>
42
43 <div class="hf-small-margin">
44 <h2 class="nav-tab-wrapper" id="hf-tabs-nav">
45 <?php foreach( $tabs as $tab => $name ) {
46 $class = ( $active_tab === $tab ) ? 'nav-tab-active' : '';
47 echo sprintf( '<a class="nav-tab nav-tab-%s %s" data-tab-target="%s" href="%s">%s</a>', $tab, $class, $tab, $this->get_tab_url( $tab ), $name );
48 } ?>
49 </h2>
50
51 <div id="tabs">
52 <?php
53 // output each tab
54 foreach( $tabs as $tab => $name ) {
55 $class = ($active_tab === $tab) ? 'hf-tab-active' : '';
56 echo sprintf('<div class="hf-tab %s" id="tab-%s" data-tab="%s">', $class, $tab, $tab);
57 do_action( 'hf_admin_output_form_tab_' . $tab, $form );
58 echo '</div>';
59 } // end foreach tab
60 ?>
61
62 </div><!-- / tabs -->
63 </div>
64
65 </form>
66
67 <?php require __DIR__ . '/admin-footer.php'; ?>
68 </div>
69