{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/9466","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9466/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9466/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9466/events","html_url":"https://github.com/joomla/joomla-cms/pull/9466","id":141833291,"number":9466,"title":"#9454 - Media manager, image selection with fieldid does not work on Isis","user":{"login":"anibalsanchez","id":385780,"avatar_url":"https://avatars.githubusercontent.com/u/385780?v=3","gravatar_id":"","url":"https://api.github.com/users/anibalsanchez","html_url":"https://github.com/anibalsanchez","followers_url":"https://api.github.com/users/anibalsanchez/followers","following_url":"https://api.github.com/users/anibalsanchez/following{/other_user}","gists_url":"https://api.github.com/users/anibalsanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/anibalsanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anibalsanchez/subscriptions","organizations_url":"https://api.github.com/users/anibalsanchez/orgs","repos_url":"https://api.github.com/users/anibalsanchez/repos","events_url":"https://api.github.com/users/anibalsanchez/events{/privacy}","received_events_url":"https://api.github.com/users/anibalsanchez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/3.5.0-blocker","name":"3.5.0-blocker","color":"fbca04"},{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2016-03-18T10:50:28Z","updated_at":"2016-03-19T22:58:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/9466","html_url":"https://github.com/joomla/joomla-cms/pull/9466","diff_url":"https://github.com/joomla/joomla-cms/pull/9466.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/9466.patch"},"body":"Pull Request for Issue #9454.\r\n\r\n#### Summary of Changes\r\n\r\nThe original button from media/images fixes the issue in the case I have found.\r\n\r\n#### Testing Instructions\r\n\r\nPaste the following same code to generate a button to choose an image and fill the name field of a user in administrator/components/com_users/views/user/tmpl/edit.php\r\n\r\nBefore the patch, in J3.5 RC4, the image can't be inserted in the name field.\r\n\r\nAfter the patch, when you select an image and Insert it, the file name replaces the user name.\r\n\r\n\t\t$idTag = 'jform_name';\r\n\t\t$remoteUrl = 'index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;asset=com_users&amp;author=' . JFactory::getUser()->id . '&amp;fieldid=' . $idTag;\r\n        $buttonId = $idTag . '_btn';\r\n\r\n        JHtml::_('bootstrap.modal');\r\n        $test_control[] = '<a id=\"' . $buttonId . '\" href=\"#' . $idTag . '_modal\" role=\"button\" class=\"btn\" data-toggle=\"modal\" title=\"' . JText::_('JSELECT') . '\">' . JText::_('JSELECT') . '</a>';\r\n        $test_control[] = JHtmlBootstrap::renderModal(\r\n                $idTag . '_modal',\r\n                array(\r\n                'url' => $remoteUrl,\r\n                'title' => JText::_('JSELECT'),\r\n                'height' => '600px', 'width' => '500px')\r\n        );\r\n\r\n\t\techo implode('', $test_control);\r\n        \r\n\t\tJFactory::getDocument()->addScriptDeclaration(\"\r\n        window.jInsertFieldValue = function(value, id) {jQuery('#' + id).val(value);};\r\n        window.jModalClose = function() {jQuery('div.modal').modal('hide');};\r\n        \");   \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/198804331","html_url":"https://github.com/joomla/joomla-cms/pull/9466#issuecomment-198804331","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/9466","id":198804331,"user":{"login":"brianteeman","id":1296369,"avatar_url":"https://avatars.githubusercontent.com/u/1296369?v=3","gravatar_id":"","url":"https://api.github.com/users/brianteeman","html_url":"https://github.com/brianteeman","followers_url":"https://api.github.com/users/brianteeman/followers","following_url":"https://api.github.com/users/brianteeman/following{/other_user}","gists_url":"https://api.github.com/users/brianteeman/gists{/gist_id}","starred_url":"https://api.github.com/users/brianteeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianteeman/subscriptions","organizations_url":"https://api.github.com/users/brianteeman/orgs","repos_url":"https://api.github.com/users/brianteeman/repos","events_url":"https://api.github.com/users/brianteeman/events{/privacy}","received_events_url":"https://api.github.com/users/brianteeman/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T22:58:00Z","updated_at":"2016-03-19T22:58:00Z","body":"RTC<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/9466\">issues.joomla.org/joomla-cms/9466</a>.</sub>"}}