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"
/>
When you click on the select button the modal popup should open
When you click on the select button nothing happens
Bug fix: /administrator/components/com_categories/models/fields/modal/category.php
149: // Edit category button
150: if ($allowEdit)
151: {
152: $html[] = '<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: . '<span class="icon-edit"></span>' . JText::_('JACTION_EDIT')
158: . '</a>';
159:
160: $html[] = JHtml::_(
161: 'bootstrap.renderModal',
162: 'modalCategory-' . $this->id,
163: array(
164: 'url' => $link . '&' . JSession::getFormToken() . '=1"',
165: 'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'),
166: 'width' => '800px',
167: 'height' => '300px',
168: 'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
169: . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
170: )
171: );
172: }
149: // Edit category button
150: if ($allowEdit)
151: {
152: $html[] = '<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: . '<span class="icon-edit"></span>' . JText::_('JACTION_EDIT')
158: . '</a>';
159: }
160:
161: $html[] = JHtml::_(
162: 'bootstrap.renderModal',
163: 'modalCategory-' . $this->id,
164: array(
165: 'url' => $link . '&' . JSession::getFormToken() . '=1"',
166: 'title' => JText::_('COM_CATEGORIES_SELECT_A_CATEGORY'),
167: 'width' => '800px',
168: 'height' => '300px',
169: 'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
170: . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
171: )
172: );
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-10-28 15:50:58 |
Closed_By | ⇒ | zero-24 |
@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.