| @@ -1,42 +1,20 @@ | ||
| 1 | 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 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 12 | 4 | } |
| 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 | 5 | ?> |
| 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'] ); ?>"> | |
| 6 | +<div class="frm-inline-modal postbox <?php echo esc_attr( $args['class'] . ( $args['show'] ? '' : ' frm_hidden' ) ); ?>" id="<?php echo esc_attr( $args['id'] ); ?>"> | |
| 7 | + <a href="#" class="dismiss alignright" title="<?php esc_attr_e( 'Close', 'formidable' ); ?>"> | |
| 8 | + <?php FrmAppHelper::icon_by_class( 'frmfont frm_close_icon', array( 'aria-label' => __( 'Close', 'formidable' ) ) ); ?> | |
| 9 | + </a> | |
| 10 | + <ul class="frm-nav-tabs"> | |
| 11 | + <li class="frm-tabs"> | |
| 12 | + <a href="#"> | |
| 13 | + <?php echo esc_html( $args['title'] ); ?> | |
| 14 | + </a> | |
| 15 | + </li> | |
| 16 | + </ul> | |
| 17 | + <div class="inside"> | |
| 40 | 18 | <?php call_user_func( $args['callback'], $args['args'] ); ?> |
| 41 | 19 | </div> |
| 42 | 20 | </div> |