PluginProbe
HTML Forms – Simple WordPress Forms Plugin / 1.6.3
HTML Forms – Simple WordPress Forms Plugin v1.6.3
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.6.3, at views/page-edit-form.php

79 lines 3.7 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>
33
34 <table class="form-table">
35
36 <tr valign="top" class="hide-if-no-js">
37 <th scope="row" style="width:80px;"><?php _e( 'Slug', 'html-forms' ); ?></th>
38 <td>
39 <input type="text" class="regular-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>
40 </td>
41 </tr>
42
43 <tr valign="top">
44 <th scope="row" style="width:80px;"><?php _e( 'Shortcode', 'html-forms' ); ?></th>
45 <td>
46 <input type="text" class="regular-text" id="shortcode" value="<?php echo esc_attr( sprintf( '[hf_form slug="%s"]', $form->slug ) ); ?>" readonly onclick="this.select()">
47 <p class="description"><?php _e( 'Copy this shortcode and paste it into your post, page, or text widget content.', 'html-forms' ); ?></p>
48 </td>
49 </tr>
50
51 </table>
52
53 <div class="hf-small-margin">
54 <h2 class="nav-tab-wrapper" id="hf-tabs-nav">
55 <?php foreach( $tabs as $tab => $name ) {
56 $class = ( $active_tab === $tab ) ? 'nav-tab-active' : '';
57 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 );
58 } ?>
59 </h2>
60
61 <div id="tabs">
62 <?php
63 // output each tab
64 foreach( $tabs as $tab => $name ) {
65 $class = ($active_tab === $tab) ? 'hf-tab-active' : '';
66 echo sprintf('<div class="hf-tab %s" id="tab-%s" data-tab="%s">', $class, $tab, $tab);
67 do_action( 'hf_admin_output_form_tab_' . $tab, $form );
68 echo '</div>';
69 } // end foreach tab
70 ?>
71
72 </div><!-- / tabs -->
73 </div>
74
75 </form>
76
77 <?php require __DIR__ . '/admin-footer.php'; ?>
78 </div>
79