PluginProbe
HTML Forms – Simple WordPress Forms Plugin / 1.1
HTML Forms – Simple WordPress Forms Plugin v1.1
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 / tab-actions.php

tab-actions.php in HTML Forms – Simple WordPress Forms Plugin 1.1, at views/tab-actions.php

51 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $available_actions = $this->get_available_form_actions();
3 ?>
4
5 <div>
6 <h2><?php echo __( 'Form Actions', 'html-forms' ); ?></h2>
7
8 <div id="hf-form-actions">
9 <?php
10 if( ! empty( $form->settings['actions'] ) ) {
11 $index = 0;
12 foreach ($form->settings['actions'] as $action_settings ) {
13 ?>
14 <div class="hf-action-settings" data-title="<?php echo esc_attr( $available_actions[ $action_settings['type'] ] ); ?>">
15 <?php do_action( 'hf_render_form_action_' . $action_settings['type'] . '_settings', $action_settings, $index++ ); ?>
16 </div>
17 <?php
18 }
19 }
20
21 echo '<p id="hf-form-actions-empty">' . __( 'No form actions configured for this form.', 'html-forms' ) . '</p>';
22 ?>
23 </div>
24 </div>
25
26 <div class="hf-medium-margin">
27 <h3><?php echo __( 'Add form action', 'html-forms' ); ?></h3>
28 <p><?php _e( 'Use the below button(s) to configure and perform an action whenever this form is successfully submitted.', 'html-forms' ); ?></p>
29 <p id="hf-available-form-actions">
30 <?php
31 foreach( $available_actions as $type => $label ) {
32 echo sprintf( '<input type="button" value="%s" data-action-type="%s" class="button" />', esc_html( $label ), esc_attr( $type ) );
33 };
34 ?>
35 </p>
36 </div>
37
38 <div>
39 <?php submit_button(); ?>
40 </div>
41
42 <div style="display: none;" id="hf-form-action-templates">
43 <?php
44 foreach( $available_actions as $type => $label ) {
45 echo sprintf( '<script type="text/x-template" id="hf-action-type-%s-template">', $type );
46 do_action( 'hf_render_form_action_' . $type . '_settings', array(), '$index' );
47 echo '</script>';
48 }
49 ?>
50 </div>
51