Nested repeatable template doesn't have a remove button

edited April 2014 in Bug Reports
I used a 2-level repeatable template. While the children level contains options for removing, the parent level doesn't have the option. I tried to set depth and removable (seems not implemented yet) attributes, but it didn't work. Is there any way to resolve the issue?

Comments

  • edited 3:34AM
    Can you supply the layout code you are using and is this using the latest version?
  • edited 3:34AM
    The following is the layout code:
    I am using version 1.5.
    Haven't got a chance to update to 1.6.

    $housing_sections = array(

    'heading' => array('label' => lang('layout_field_heading')),
    'sections' => array( 'add_extra' => FALSE,
    'init_display' => 'none',
    'dblclick' => 'accordian',
    'repeatable' => TRUE,
    'style' => 'width: 950px;',
    'type' => 'template',
    'label' => 'House sections',
    'title_field' => 'title',
    'fields' => array(
    'house_section' => array('type' => 'section', 'label' => '{__title__}'),
    'title' => array('label' => 'Title', 'required' => true),
    'house_img' => array('type' => 'asset', 'label' => 'Front Image'),
    'location' => array('label' => 'Location'),
    'parking' => array('label' => 'Parking'),
    'style' => array('label' => 'Style'),
    'phone' => array('label' => 'Telephone'),
    'email' => array('label' => 'Email'),
    'price' => array('label' => 'Price'),
    'description' => array('type' => 'textarea', 'label' => 'Description'),
    'photos' => array('add_extra' => FALSE,
    'init_display' => 'none',
    'dblclick' => 'accordian',
    'repeatable' => TRUE,
    'style' => 'width: 950px;',
    'type' => 'template',
    'label' => 'Photos',
    'title_field' => 'photo',
    'fields' => array(
    'house_photo' => array('type' => 'section', 'label' => '{__title__}'),
    'photo' => array('type' => 'asset','label' => 'Photo'),
    )
    ),
    'house_map' => array('label' => 'House Map iframe', 'style' => 'width: 500px'),
    )
    )
    );

    $housing_layout = new Fuel_layout('housing');
    $housing_layout->set_description('This is the housing layout');
    $housing_layout->set_label('housing');
    $housing_layout->add_fields($common_meta);
    $housing_layout->add_fields($common_sections);
    $housing_layout->add_fields($housing_sections);
    $housing_layout->add_fields($common_footer);

    $config['layouts']['housing'] = $housing_layout;
  • edited 3:34AM
    Thanks for providing the code. That appears to be a bug. I've posted a fix in the develop branch which you can pull. The develop branch will contain the next release bug patches.
  • edited 3:34AM
    I've applied the patch to my code, and it works perfectly! Thanks a lot !!
Sign In or Register to comment.