← All changes
|
classes/views/frm-fields/back-end/field-options.php
+37
-12
6.4.1
→
trunk
View file →
| @@ -1,5 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Field options settings in the form builder. | |
| 4 | + * | |
| 5 | + * @package Formidable | |
| 6 | + * | |
| 7 | + * @var FrmFieldType $this Field type handler that included this template. | |
| 8 | + * @var array $args Arguments including 'field' and 'field_obj'. | |
| 9 | + * @var bool $should_hide_bulk_edit Whether to hide the bulk edit link. | |
| 10 | + * @var string $option_title Title attribute for the bulk edit link. | |
| 11 | + */ | |
| 12 | + | |
| 2 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 14 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 15 | } |
| 5 | 16 | |
| @@ -4,22 +15,36 @@ | ||
| 4 | 15 | } |
| 5 | 16 | |
| 6 | 17 | $field_option_count = is_array( $args['field']['options'] ) ? count( $args['field']['options'] ) : 0; |
| 7 | 18 | ?> |
| 8 | -<span class="frm-bulk-edit-link <?php echo empty( FrmField::get_option( $args['field'], 'image_options' ) ) ? '' : 'frm_hidden'; ?> "> | |
| 9 | - <a href="#" title="<?php echo esc_attr( $option_title ); ?>" class="frm-bulk-edit-link"> | |
| 10 | - <?php echo esc_html( $this->get_bulk_edit_string() ); ?> | |
| 19 | +<span class="frm-hr frm-mb-sm"></span> | |
| 20 | + | |
| 21 | +<span class="frm-bulk-edit-link <?php echo $should_hide_bulk_edit ? 'frm_hidden' : ''; ?>"> | |
| 22 | + <a href="#" title="<?php echo esc_attr( $option_title ); ?>" class="frm-h-stack frm-justify-end frm-bulk-edit-link"> | |
| 23 | + <span> | |
| 24 | + <?php | |
| 25 | + FrmAppHelper::icon_by_class( | |
| 26 | + 'frmfont frm_simple_pencil_icon frm_svg24', | |
| 27 | + array( | |
| 28 | + | |
| 29 | + 'aria-label' => __( 'Bulk Edit', 'formidable' ), | |
| 30 | + ) | |
| 31 | + ); | |
| 32 | + ?> | |
| 33 | + </span> | |
| 34 | + <span> | |
| 35 | + <?php | |
| 36 | + // skipcq: PHP-E1002 | |
| 37 | + echo esc_html( $this->get_bulk_edit_string() ); | |
| 38 | + ?> | |
| 39 | + </span> | |
| 11 | 40 | </a> |
| 12 | 41 | </span> |
| 13 | 42 | |
| 14 | 43 | <?php do_action( 'frm_add_multiple_opts_labels', $args['field'] ); ?> |
| 15 | 44 | |
| 16 | -<ul id="frm_field_<?php echo esc_attr( $args['field']['id'] ); ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo ( $field_option_count > 10 ) ? ' frm_field_opts_list' : ''; ?> frm_add_remove" data-key="<?php echo esc_attr( $args['field']['field_key'] ); ?>"> | |
| 17 | - <?php $this->show_single_option( $args ); ?> | |
| 45 | +<ul id="frm_field_<?php echo esc_attr( $args['field']['id'] ); ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo $field_option_count > 10 ? ' frm_field_opts_list' : ''; ?> frm_add_remove" data-key="<?php echo esc_attr( $args['field']['field_key'] ); ?>"> | |
| 46 | + <?php | |
| 47 | + // skipcq: PHP-E1002 | |
| 48 | + $this->show_single_option( $args ); | |
| 49 | + ?> | |
| 18 | 50 | </ul> |
| 19 | - | |
| 20 | -<div class="frm6 frm_form_field frm_add_opt_container"> | |
| 21 | - <a href="javascript:void(0);" data-opttype="single" class="frm_cb_button frm-small-add frm_add_opt frm6 frm_form_field" id="frm_add_opt_<?php echo esc_attr( $args['field']['id'] ); ?>"> | |
| 22 | - <span class="frm_icon_font frm_add_tag"></span> | |
| 23 | - <?php echo esc_html( $this->get_add_option_string() ); ?> | |
| 24 | - </a> | |
| 25 | -</div> | |