| 1 |
<?php |
| 2 |
/** |
| 3 |
* Inline modal wrapper used inside field settings. |
| 4 |
* |
| 5 |
* @package Formidable |
| 6 |
* |
| 7 |
* @var array $args Modal arguments: dismiss-icon (bool), show (bool), class (string), id (string), title (string), inside_class (string), callback (callable), args (mixed). |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'ABSPATH' ) ) { |
| 11 |
die( 'You are not allowed to call this page directly.' ); |
| 12 |
} |
| 13 |
|
| 14 |
if ( ! $args['dismiss-icon'] ) { |
| 15 |
$args['class'] .= ' frm-modal-no-dismiss'; |
| 16 |
} |
| 17 |
|
| 18 |
if ( ! $args['show'] ) { |
| 19 |
$args['class'] .= ' frm_hidden'; |
| 20 |
} |
| 21 |
?> |
| 22 |
<div class="frm-inline-modal frm-modal postbox <?php echo esc_attr( $args['class'] ); ?>" id="<?php echo esc_attr( $args['id'] ); ?>"> |
| 23 |
<?php if ( $args['dismiss-icon'] ) { ?> |
| 24 |
<a href="#" class="dismiss" title="<?php esc_attr_e( 'Close', 'formidable' ); ?>"> |
| 25 |
<?php FrmAppHelper::icon_by_class( 'frmfont frm_close_icon', array( 'aria-label' => __( 'Close', 'formidable' ) ) ); ?> |
| 26 |
</a> |
| 27 |
<?php } ?> |
| 28 |
|
| 29 |
<?php if ( $args['title'] ) { ?> |
| 30 |
<ul class="frm-nav-tabs"> |
| 31 |
<li class="frm-tabs"> |
| 32 |
<a href="#"> |
| 33 |
<?php echo esc_html( $args['title'] ); ?> |
| 34 |
</a> |
| 35 |
</li> |
| 36 |
</ul> |
| 37 |
<?php } ?> |
| 38 |
|
| 39 |
<div class="<?php echo esc_attr( $args['inside_class'] ); ?>"> |
| 40 |
<?php call_user_func( $args['callback'], $args['args'] ); ?> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
|