1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<?php
namespace AutomateWoo;
defined( 'ABSPATH' ) || exit;
/** * @var Variable $variable */
?>
<div class="automatewoo-modal__header"> <h1><?php echo esc_html( $variable->get_name() ); ?></h1> </div>
<div class="automatewoo-modal__body"> <div class="automatewoo-modal__body-inner">
<?php if ( $variable->get_description() ) : ?> <p><?php echo wp_kses_post( $variable->get_description() ); ?></p> <?php endif; ?>
<table class="automatewoo-table automatewoo-table--bordered aw-workflow-variable-parameters-table">
<?php foreach ( $variable->get_parameter_fields() as $field ) : ?>
<tr class="automatewoo-table__row aw-workflow-variables-parameter-row" data-parameter-name="<?php echo esc_attr( $field->get_name() ); ?>" <?php if ( isset( $field->meta['show'] ) ) : ?> data-parameter-show="<?php echo esc_attr( $field->meta['show'] ); ?>" <?php endif; ?> <?php echo ( $field->get_required() ? 'data-is-required="true"' : '' ); ?> >
<td class="automatewoo-table__col automatewoo-table__col--label"> <strong><?php echo esc_html( $field->get_name() ); ?></strong> <?php if ( $field->get_required() ) : ?> <span class="aw-required-asterisk"></span> <?php endif; ?> <?php Admin::help_tip( $field->get_description() ); ?> </td> <td class="automatewoo-table__col automatewoo-table__col--field"> <?php $field->add_classes( 'aw-workflow-variable-parameter' ); ?> <?php $field->render( '' ); ?> </td> </tr> <?php endforeach; ?>
<?php if ( $variable->use_fallback ) : ?> <tr class="automatewoo-table__row"> <td class="automatewoo-table__col automatewoo-table__col--label"> <strong>fallback</strong> <?php Admin::help_tip( __( 'Displayed when there is no value found.', 'automatewoo' ) ); ?> </td> <td class="automatewoo-table__col automatewoo-table__col--field"> <input type="text" name="fallback" class="automatewoo-field automatewoo-field--type-text aw-workflow-variable-parameter"> </td> </tr> <?php endif; ?>
</table>
<div class="aw-workflow-variable-clipboard-form"> <div id="aw_workflow_variable_preview_field" class="aw-workflow-variable-preview-field" data-variable="<?php echo esc_attr( $variable->get_name() ); ?>"></div> <button class="aw-clipboard-btn button button-primary button-large"><?php esc_html_e( 'Copy to clipboard', 'automatewoo' ); ?></button> </div>
</div> </div>
|