?
Referenced as Pull Request for: # 8185
avatar eshiol
eshiol
28 Oct 2015

Steps to reproduce the issue

Create a form with a modal category field

<field
name="category"
type="modal_category"
label="category"
labelclass="control-label"
edit="false"
addfieldpath="/administrator/components/com_contact/models/fields"
/>

Expected result

When you click on the select button the modal popup should open

Actual result

When you click on the select button nothing happens

System information (as much as possible)

Additional comments

Bug fix: /administrator/components/com_categories/models/fields/modal/category.php

149:        // Edit category button
150:        if ($allowEdit)
151:        {
152:            $html[] = '&lt;a'
153:                . ' class="btn hasTooltip' . ($value ? '' : ' hidden') . '"'
154:                . ' href="index.php?option=com_categories&layout=modal&tmpl=component&task=category.edit&id=' . $value . '"'
155:                . ' target="_blank"'
156:                . ' title="' . JHtml::tooltipText('COM_CATEGORIES_EDIT_CATEGORY') . '" >'
157:                . '&lt;span class="icon-edit">&lt;/span>' . JText::_('JACTION_EDIT')
158:                . '&lt;/a>';
159:
160:            $html[] = JHtml::_(
161:                'bootstrap.renderModal',
162:                'modalCategory-' . $this->id,
163:                array(
164:                    'url' => $link . '&amp;' . JSession::getFormToken() . '=1"',
165:                    'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'),
166:                    'width' => '800px',
167:                    'height' => '300px',
168:                    'footer' => '&lt;button class="btn" data-dismiss="modal" aria-hidden="true">'
169:                        . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '&lt;/button>'
170:                )
171:            );
172:        }
149:        // Edit category button
150:        if ($allowEdit)
151:        {
152:            $html[] = '&lt;a'
153:                . ' class="btn hasTooltip' . ($value ? '' : ' hidden') . '"'
154:                . ' href="index.php?option=com_categories&layout=modal&tmpl=component&task=category.edit&id=' . $value . '"'
155:                . ' target="_blank"'
156:                . ' title="' . JHtml::tooltipText('COM_CATEGORIES_EDIT_CATEGORY') . '" >'
157:                . '&lt;span class="icon-edit">&lt;/span>' . JText::_('JACTION_EDIT')
158:                . '&lt;/a>';
159:        }
160:
161:        $html[] = JHtml::_(
162:            'bootstrap.renderModal',
163:            'modalCategory-' . $this->id,
164:            array(
165:                'url' => $link . '&amp;' . JSession::getFormToken() . '=1"',
166:                'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'),
167:                'width' => '800px',
168:                'height' => '300px',
169:                'footer' => '&lt;button class="btn" data-dismiss="modal" aria-hidden="true">'
170:                    . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '&lt;/button>'
171:            )
172:        );
avatar eshiol eshiol - open - 28 Oct 2015
avatar zero-24
zero-24 - comment - 28 Oct 2015

@eshiol can you send your changes as Pull Request against the staging branch? The easyiest way is shown here: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests Thanks.

avatar zero-24
zero-24 - comment - 28 Oct 2015

Closing as we have a PR here. #8185

avatar zero-24 zero-24 - change - 28 Oct 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-10-28 15:50:58
Closed_By zero-24
avatar zero-24 zero-24 - close - 28 Oct 2015

Add a Comment

Login with GitHub to post a comment