redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Section field indent end

Open Webcreations907 opened this issue 11 years ago • 6 comments

Hello hope all is well. :)

Seem to have a issue with section end field when indenting, something like the below will hide any fields after the indent=>false.

array(
    'id' => 'test-section-start',
    'type' => 'section',
    'title' => __('Test Section', 'framework'),
    'indent' => true
),
array(
    'id'        => 'test-text-field',
    'type'      => 'text',
    'title'     => __('Some Field', 'framework'),
    'subtitle'  => __('A Text Field', 'framework'),
),
array(
    'id'        => 'test-text-field-another',
    'type'      => 'text',
    'title'     => __('Some Field', 'framework'),
    'subtitle'  => __('A Text Field', 'framework'),
),
array(
    'id'     => 'test-section-end',
    'type'   => 'section',
    'indent' => false,
),
array( //This One Is Hidden
    'id'        => 'test-text-field-one-more',
    'type'      => 'text',
    'title'     => __('This isn\'t seen', 'framework'),
    'subtitle'  => __('A Text Field', 'framework'),
),

I see in field_section.php that the CSS class of hide is getting applied to the fields after, if I comment that hide class out the missing fields get shown correctly

WP v4.1.1 Redux 3.4.3.2 - 3.4.3.4 Embedded in theme

Thanks :)

Webcreations907 avatar Feb 24 '15 21:02 Webcreations907

I guess I added that in there to fix someone elses issue. Taking it out will surely break whatever that was. I'll try and get to that soon.

kprovance avatar Feb 24 '15 21:02 kprovance

Great thanks, I just put/changed the below in field_section.php line 72 there for now till you get a chance.

if ( isset( $this->field['indent'] ) &&  true === $this->field['indent'] ) {
    $add_class = ' form-table-section-indented';
} elseif( !isset( $this->field['indent'] ) || ( isset( $this->field['indent'] ) && false !== $this->field['indent'] ) ) {
   $add_class = " hide";
}

Webcreations907 avatar Feb 24 '15 22:02 Webcreations907

Cool, I'll patch that in and push it. Honestly, I can;t remember what the original issue was, or any issue on the tracker about it...so if it comes back up, I'll deal with it then. :)

kprovance avatar Feb 24 '15 22:02 kprovance

Okay, done. Thanks again!

kprovance avatar Feb 24 '15 22:02 kprovance

Awesome, thanks :money_with_wings: donated :wink:

Webcreations907 avatar Feb 24 '15 23:02 Webcreations907

Awesome. Thanks @Webcreations907

dovy avatar Feb 24 '15 23:02 dovy