{"action":"created","comment":{"url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/comments/192566728","pull_request_review_id":125373228,"id":192566728,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjU2NjcyOA==","diff_hunk":"@@ -26,7 +26,10 @@ public function init()\n         PhoneInputAsset::register($this->view);\n         $id = ArrayHelper::getValue($this->options, 'id');\n         $jsOptions = $this->jsOptions ? Json::encode($this->jsOptions) : \"\";\n-        $this->view->registerJs(\"var input = $('#$id'); input.intlTelInput($jsOptions); input.parents('form').on('submit', function() { input.val(input.intlTelInput('getNumber')); });\");\n+        $this->view->registerJs(\"$('#$id').intlTelInput($jsOptions);\");\n+        if($this->hasModel()) {\n+            $this->view->registerJs(\"$('#$id').parents('form').on('submit', function() { $('#$id').val(input.intlTelInput('getNumber')); })\");","path":"src/PhoneInput.php","position":null,"original_position":7,"commit_id":"b6bde8aef370296920533be73edfe47b4fdf54be","original_commit_id":"b6bde8aef370296920533be73edfe47b4fdf54be","user":{"login":"ekussberg","id":5912520,"node_id":"MDQ6VXNlcjU5MTI1MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/5912520?v=4","gravatar_id":"","url":"https://api.github.com/users/ekussberg","html_url":"https://github.com/ekussberg","followers_url":"https://api.github.com/users/ekussberg/followers","following_url":"https://api.github.com/users/ekussberg/following{/other_user}","gists_url":"https://api.github.com/users/ekussberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ekussberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekussberg/subscriptions","organizations_url":"https://api.github.com/users/ekussberg/orgs","repos_url":"https://api.github.com/users/ekussberg/repos","events_url":"https://api.github.com/users/ekussberg/events{/privacy}","received_events_url":"https://api.github.com/users/ekussberg/received_events","type":"User","site_admin":false},"body":"It doesn't work for me so i replaced the last \"input\" => $('#$id') and then it works like charm","created_at":"2018-06-02T18:28:16Z","updated_at":"2018-06-02T18:28:16Z","html_url":"https://github.com/Borales/yii2-phone-input/pull/32#discussion_r192566728","pull_request_url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/comments/192566728"},"html":{"href":"https://github.com/Borales/yii2-phone-input/pull/32#discussion_r192566728"},"pull_request":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32","id":136287992,"node_id":"MDExOlB1bGxSZXF1ZXN0MTM2Mjg3OTky","html_url":"https://github.com/Borales/yii2-phone-input/pull/32","diff_url":"https://github.com/Borales/yii2-phone-input/pull/32.diff","patch_url":"https://github.com/Borales/yii2-phone-input/pull/32.patch","issue_url":"https://api.github.com/repos/Borales/yii2-phone-input/issues/32","number":32,"state":"closed","locked":false,"title":"Added a before submit handler using jQuery so that the widget works","user":{"login":"reastyn","id":6328667,"node_id":"MDQ6VXNlcjYzMjg2Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/6328667?v=4","gravatar_id":"","url":"https://api.github.com/users/reastyn","html_url":"https://github.com/reastyn","followers_url":"https://api.github.com/users/reastyn/followers","following_url":"https://api.github.com/users/reastyn/following{/other_user}","gists_url":"https://api.github.com/users/reastyn/gists{/gist_id}","starred_url":"https://api.github.com/users/reastyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reastyn/subscriptions","organizations_url":"https://api.github.com/users/reastyn/orgs","repos_url":"https://api.github.com/users/reastyn/repos","events_url":"https://api.github.com/users/reastyn/events{/privacy}","received_events_url":"https://api.github.com/users/reastyn/received_events","type":"User","site_admin":false},"body":"Hey,\r\nfound that the plugin not working and with only one line of code it can work even now with newest intlTelInput.\r\n\r\nWould you consider to add this quickfix to the live version so that the yii2 community can use this awesome widget?\r\nThanks","created_at":"2017-08-17T15:36:02Z","updated_at":"2018-06-02T18:28:16Z","closed_at":"2017-08-17T16:03:12Z","merged_at":"2017-08-17T16:03:12Z","merge_commit_sha":"16498a2e2fa9440ea1478d5aa1dda159e220e05c","assignee":{"login":"Borales","id":1118933,"node_id":"MDQ6VXNlcjExMTg5MzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1118933?v=4","gravatar_id":"","url":"https://api.github.com/users/Borales","html_url":"https://github.com/Borales","followers_url":"https://api.github.com/users/Borales/followers","following_url":"https://api.github.com/users/Borales/following{/other_user}","gists_url":"https://api.github.com/users/Borales/gists{/gist_id}","starred_url":"https://api.github.com/users/Borales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Borales/subscriptions","organizations_url":"https://api.github.com/users/Borales/orgs","repos_url":"https://api.github.com/users/Borales/repos","events_url":"https://api.github.com/users/Borales/events{/privacy}","received_events_url":"https://api.github.com/users/Borales/received_events","type":"User","site_admin":false},"assignees":[{"login":"Borales","id":1118933,"node_id":"MDQ6VXNlcjExMTg5MzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1118933?v=4","gravatar_id":"","url":"https://api.github.com/users/Borales","html_url":"https://github.com/Borales","followers_url":"https://api.github.com/users/Borales/followers","following_url":"https://api.github.com/users/Borales/following{/other_user}","gists_url":"https://api.github.com/users/Borales/gists{/gist_id}","starred_url":"https://api.github.com/users/Borales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Borales/subscriptions","organizations_url":"https://api.github.com/users/Borales/orgs","repos_url":"https://api.github.com/users/Borales/repos","events_url":"https://api.github.com/users/Borales/events{/privacy}","received_events_url":"https://api.github.com/users/Borales/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":222863459,"node_id":"MDU6TGFiZWwyMjI4NjM0NTk=","url":"https://api.github.com/repos/Borales/yii2-phone-input/labels/bug","name":"bug","color":"fc2929","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32/commits","review_comments_url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32/comments","review_comment_url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Borales/yii2-phone-input/issues/32/comments","statuses_url":"https://api.github.com/repos/Borales/yii2-phone-input/statuses/b6bde8aef370296920533be73edfe47b4fdf54be","head":{"label":"reastyn:master","ref":"master","sha":"b6bde8aef370296920533be73edfe47b4fdf54be","user":{"login":"reastyn","id":6328667,"node_id":"MDQ6VXNlcjYzMjg2Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/6328667?v=4","gravatar_id":"","url":"https://api.github.com/users/reastyn","html_url":"https://github.com/reastyn","followers_url":"https://api.github.com/users/reastyn/followers","following_url":"https://api.github.com/users/reastyn/following{/other_user}","gists_url":"https://api.github.com/users/reastyn/gists{/gist_id}","starred_url":"https://api.github.com/users/reastyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reastyn/subscriptions","organizations_url":"https://api.github.com/users/reastyn/orgs","repos_url":"https://api.github.com/users/reastyn/repos","events_url":"https://api.github.com/users/reastyn/events{/privacy}","received_events_url":"https://api.github.com/users/reastyn/received_events","type":"User","site_admin":false},"repo":{"id":100615482,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA2MTU0ODI=","name":"yii2-phone-input","full_name":"reastyn/yii2-phone-input","owner":{"login":"reastyn","id":6328667,"node_id":"MDQ6VXNlcjYzMjg2Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/6328667?v=4","gravatar_id":"","url":"https://api.github.com/users/reastyn","html_url":"https://github.com/reastyn","followers_url":"https://api.github.com/users/reastyn/followers","following_url":"https://api.github.com/users/reastyn/following{/other_user}","gists_url":"https://api.github.com/users/reastyn/gists{/gist_id}","starred_url":"https://api.github.com/users/reastyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reastyn/subscriptions","organizations_url":"https://api.github.com/users/reastyn/orgs","repos_url":"https://api.github.com/users/reastyn/repos","events_url":"https://api.github.com/users/reastyn/events{/privacy}","received_events_url":"https://api.github.com/users/reastyn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reastyn/yii2-phone-input","description":"Yii2 International telephone numbers","fork":true,"url":"https://api.github.com/repos/reastyn/yii2-phone-input","forks_url":"https://api.github.com/repos/reastyn/yii2-phone-input/forks","keys_url":"https://api.github.com/repos/reastyn/yii2-phone-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reastyn/yii2-phone-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reastyn/yii2-phone-input/teams","hooks_url":"https://api.github.com/repos/reastyn/yii2-phone-input/hooks","issue_events_url":"https://api.github.com/repos/reastyn/yii2-phone-input/issues/events{/number}","events_url":"https://api.github.com/repos/reastyn/yii2-phone-input/events","assignees_url":"https://api.github.com/repos/reastyn/yii2-phone-input/assignees{/user}","branches_url":"https://api.github.com/repos/reastyn/yii2-phone-input/branches{/branch}","tags_url":"https://api.github.com/repos/reastyn/yii2-phone-input/tags","blobs_url":"https://api.github.com/repos/reastyn/yii2-phone-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reastyn/yii2-phone-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reastyn/yii2-phone-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/reastyn/yii2-phone-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reastyn/yii2-phone-input/statuses/{sha}","languages_url":"https://api.github.com/repos/reastyn/yii2-phone-input/languages","stargazers_url":"https://api.github.com/repos/reastyn/yii2-phone-input/stargazers","contributors_url":"https://api.github.com/repos/reastyn/yii2-phone-input/contributors","subscribers_url":"https://api.github.com/repos/reastyn/yii2-phone-input/subscribers","subscription_url":"https://api.github.com/repos/reastyn/yii2-phone-input/subscription","commits_url":"https://api.github.com/repos/reastyn/yii2-phone-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/reastyn/yii2-phone-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/reastyn/yii2-phone-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/reastyn/yii2-phone-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/reastyn/yii2-phone-input/contents/{+path}","compare_url":"https://api.github.com/repos/reastyn/yii2-phone-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reastyn/yii2-phone-input/merges","archive_url":"https://api.github.com/repos/reastyn/yii2-phone-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reastyn/yii2-phone-input/downloads","issues_url":"https://api.github.com/repos/reastyn/yii2-phone-input/issues{/number}","pulls_url":"https://api.github.com/repos/reastyn/yii2-phone-input/pulls{/number}","milestones_url":"https://api.github.com/repos/reastyn/yii2-phone-input/milestones{/number}","notifications_url":"https://api.github.com/repos/reastyn/yii2-phone-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reastyn/yii2-phone-input/labels{/name}","releases_url":"https://api.github.com/repos/reastyn/yii2-phone-input/releases{/id}","deployments_url":"https://api.github.com/repos/reastyn/yii2-phone-input/deployments","created_at":"2017-08-17T14:58:56Z","updated_at":"2017-08-17T14:58:58Z","pushed_at":"2017-08-17T16:41:10Z","git_url":"git://github.com/reastyn/yii2-phone-input.git","ssh_url":"git@github.com:reastyn/yii2-phone-input.git","clone_url":"https://github.com/reastyn/yii2-phone-input.git","svn_url":"https://github.com/reastyn/yii2-phone-input","homepage":"","size":59,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Borales:master","ref":"master","sha":"0a9b27e552e165243544818c533c4fd86702bcf2","user":{"login":"Borales","id":1118933,"node_id":"MDQ6VXNlcjExMTg5MzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1118933?v=4","gravatar_id":"","url":"https://api.github.com/users/Borales","html_url":"https://github.com/Borales","followers_url":"https://api.github.com/users/Borales/followers","following_url":"https://api.github.com/users/Borales/following{/other_user}","gists_url":"https://api.github.com/users/Borales/gists{/gist_id}","starred_url":"https://api.github.com/users/Borales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Borales/subscriptions","organizations_url":"https://api.github.com/users/Borales/orgs","repos_url":"https://api.github.com/users/Borales/repos","events_url":"https://api.github.com/users/Borales/events{/privacy}","received_events_url":"https://api.github.com/users/Borales/received_events","type":"User","site_admin":false},"repo":{"id":37210371,"node_id":"MDEwOlJlcG9zaXRvcnkzNzIxMDM3MQ==","name":"yii2-phone-input","full_name":"Borales/yii2-phone-input","owner":{"login":"Borales","id":1118933,"node_id":"MDQ6VXNlcjExMTg5MzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1118933?v=4","gravatar_id":"","url":"https://api.github.com/users/Borales","html_url":"https://github.com/Borales","followers_url":"https://api.github.com/users/Borales/followers","following_url":"https://api.github.com/users/Borales/following{/other_user}","gists_url":"https://api.github.com/users/Borales/gists{/gist_id}","starred_url":"https://api.github.com/users/Borales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Borales/subscriptions","organizations_url":"https://api.github.com/users/Borales/orgs","repos_url":"https://api.github.com/users/Borales/repos","events_url":"https://api.github.com/users/Borales/events{/privacy}","received_events_url":"https://api.github.com/users/Borales/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Borales/yii2-phone-input","description":"Yii2 International telephone numbers","fork":false,"url":"https://api.github.com/repos/Borales/yii2-phone-input","forks_url":"https://api.github.com/repos/Borales/yii2-phone-input/forks","keys_url":"https://api.github.com/repos/Borales/yii2-phone-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Borales/yii2-phone-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Borales/yii2-phone-input/teams","hooks_url":"https://api.github.com/repos/Borales/yii2-phone-input/hooks","issue_events_url":"https://api.github.com/repos/Borales/yii2-phone-input/issues/events{/number}","events_url":"https://api.github.com/repos/Borales/yii2-phone-input/events","assignees_url":"https://api.github.com/repos/Borales/yii2-phone-input/assignees{/user}","branches_url":"https://api.github.com/repos/Borales/yii2-phone-input/branches{/branch}","tags_url":"https://api.github.com/repos/Borales/yii2-phone-input/tags","blobs_url":"https://api.github.com/repos/Borales/yii2-phone-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Borales/yii2-phone-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Borales/yii2-phone-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/Borales/yii2-phone-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Borales/yii2-phone-input/statuses/{sha}","languages_url":"https://api.github.com/repos/Borales/yii2-phone-input/languages","stargazers_url":"https://api.github.com/repos/Borales/yii2-phone-input/stargazers","contributors_url":"https://api.github.com/repos/Borales/yii2-phone-input/contributors","subscribers_url":"https://api.github.com/repos/Borales/yii2-phone-input/subscribers","subscription_url":"https://api.github.com/repos/Borales/yii2-phone-input/subscription","commits_url":"https://api.github.com/repos/Borales/yii2-phone-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/Borales/yii2-phone-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/Borales/yii2-phone-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/Borales/yii2-phone-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/Borales/yii2-phone-input/contents/{+path}","compare_url":"https://api.github.com/repos/Borales/yii2-phone-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Borales/yii2-phone-input/merges","archive_url":"https://api.github.com/repos/Borales/yii2-phone-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Borales/yii2-phone-input/downloads","issues_url":"https://api.github.com/repos/Borales/yii2-phone-input/issues{/number}","pulls_url":"https://api.github.com/repos/Borales/yii2-phone-input/pulls{/number}","milestones_url":"https://api.github.com/repos/Borales/yii2-phone-input/milestones{/number}","notifications_url":"https://api.github.com/repos/Borales/yii2-phone-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Borales/yii2-phone-input/labels{/name}","releases_url":"https://api.github.com/repos/Borales/yii2-phone-input/releases{/id}","deployments_url":"https://api.github.com/repos/Borales/yii2-phone-input/deployments","created_at":"2015-06-10T17:00:55Z","updated_at":"2018-06-01T02:58:21Z","pushed_at":"2018-05-07T07:59:28Z","git_url":"git://github.com/Borales/yii2-phone-input.git","ssh_url":"git@github.com:Borales/yii2-phone-input.git","clone_url":"https://github.com/Borales/yii2-phone-input.git","svn_url":"https://github.com/Borales/yii2-phone-input","homepage":"","size":60,"stargazers_count":67,"watchers_count":67,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":38,"open_issues":17,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32"},"html":{"href":"https://github.com/Borales/yii2-phone-input/pull/32"},"issue":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/issues/32"},"comments":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/Borales/yii2-phone-input/statuses/b6bde8aef370296920533be73edfe47b4fdf54be"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ekussberg"}}