Skip to content

Commit

Permalink
solve no item text issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva committed Sep 4, 2016
1 parent 147f87e commit 33684b1
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions administrator/components/com_menus/models/fields/modal/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,25 +248,11 @@ function jSelectMenu_" . $this->id . "(id, title, object) {
);
}

// Get empty field text.
if (isset($this->element['language']))
{
$clearText = JText::_('COM_MENUS_SELECT_A_MENUITEM', true);
}
elseif ((string) $this->element->option['value'] == '')
{
$clearText = JText::_($this->element->option, true);
}
else
{
$clearText = JText::_('JDEFAULT');
}

// Note: class='required' for client side validation.
$class = $this->required ? ' class="required modal-value"' : '';

$html .= '<input type="hidden" id="' . $this->id . '_id" ' . $class . ' data-required="' . (int) $this->required . '" name="' . $this->name
. '" data-text="' . htmlspecialchars($clearText, ENT_COMPAT, 'UTF-8') . '" value="' . $value . '" />';
. '" data-text="' . htmlspecialchars(JText::_('COM_MENUS_SELECT_A_MENUITEM', true), ENT_COMPAT, 'UTF-8') . '" value="' . $value . '" />';

return $html;
}
Expand Down

0 comments on commit 33684b1

Please sign in to comment.