{"action":"created","comment":{"url":"https://api.github.com/repos/PacemakerConf/site/pulls/comments/67666789","id":67666789,"diff_hunk":"@@ -30,23 +20,25 @@ function imageToField(number) {\n \n function setDefaultData(){\n   selected_event_type =  event_event_type_id.value;\n-  $.ajax({\n-    url: \"/admin/event_types/\" + selected_event_type + \".json\",\n-    success: function(response){\n-      if(response.durationHour < 10){\n-        response.durationHour = '0' + response.durationHour \n-      }\n-      if(response.durationMin < 10){\n-        response.durationMin = '0' + response.durationMin \n-      }\n-      speakerEvent = response.speakerEvent.toString() === 'true';\n-      if(!speakerEvent){\n-        event_title.value = response.defaultName;     \n+  if ($('input[name=_method]').val() !== 'patch' ) {\n+    $.ajax({\n+      url: \"/admin/event_types/\" + selected_event_type + \".json\",\n+      success: function(response){\n+        if(response.durationHour < 10){\n+          response.durationHour = '0' + response.durationHour\n+        }\n+        if(response.durationMin < 10){\n+          response.durationMin = '0' + response.durationMin\n+        }\n+        speakerEvent = response.speakerEvent.toString() === 'true';\n+        if(!speakerEvent || speakerEvent){","path":"app/assets/javascripts/event_types.js","position":41,"original_position":41,"commit_id":"72e3d1f9a7864ca0149a841de85427f9feeb1920","original_commit_id":"72e3d1f9a7864ca0149a841de85427f9feeb1920","user":{"login":"forecome","id":9201733,"avatar_url":"https://avatars.githubusercontent.com/u/9201733?v=3","gravatar_id":"","url":"https://api.github.com/users/forecome","html_url":"https://github.com/forecome","followers_url":"https://api.github.com/users/forecome/followers","following_url":"https://api.github.com/users/forecome/following{/other_user}","gists_url":"https://api.github.com/users/forecome/gists{/gist_id}","starred_url":"https://api.github.com/users/forecome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forecome/subscriptions","organizations_url":"https://api.github.com/users/forecome/orgs","repos_url":"https://api.github.com/users/forecome/repos","events_url":"https://api.github.com/users/forecome/events{/privacy}","received_events_url":"https://api.github.com/users/forecome/received_events","type":"User","site_admin":false},"body":"What you wanted to check here?","created_at":"2016-06-20T10:23:54Z","updated_at":"2016-06-20T10:23:54Z","html_url":"https://github.com/PacemakerConf/site/pull/8#discussion_r67666789","pull_request_url":"https://api.github.com/repos/PacemakerConf/site/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/comments/67666789"},"html":{"href":"https://github.com/PacemakerConf/site/pull/8#discussion_r67666789"},"pull_request":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/PacemakerConf/site/pulls/8","id":74087293,"html_url":"https://github.com/PacemakerConf/site/pull/8","diff_url":"https://github.com/PacemakerConf/site/pull/8.diff","patch_url":"https://github.com/PacemakerConf/site/pull/8.patch","issue_url":"https://api.github.com/repos/PacemakerConf/site/issues/8","number":8,"state":"open","locked":false,"title":"Bugfix","user":{"login":"tetianastakh","id":18188221,"avatar_url":"https://avatars.githubusercontent.com/u/18188221?v=3","gravatar_id":"","url":"https://api.github.com/users/tetianastakh","html_url":"https://github.com/tetianastakh","followers_url":"https://api.github.com/users/tetianastakh/followers","following_url":"https://api.github.com/users/tetianastakh/following{/other_user}","gists_url":"https://api.github.com/users/tetianastakh/gists{/gist_id}","starred_url":"https://api.github.com/users/tetianastakh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tetianastakh/subscriptions","organizations_url":"https://api.github.com/users/tetianastakh/orgs","repos_url":"https://api.github.com/users/tetianastakh/repos","events_url":"https://api.github.com/users/tetianastakh/events{/privacy}","received_events_url":"https://api.github.com/users/tetianastakh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-16T14:09:45Z","updated_at":"2016-06-20T10:23:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1eed849c3ef357293c00ba2d0ac842cf8e1d11f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PacemakerConf/site/pulls/8/commits","review_comments_url":"https://api.github.com/repos/PacemakerConf/site/pulls/8/comments","review_comment_url":"https://api.github.com/repos/PacemakerConf/site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PacemakerConf/site/issues/8/comments","statuses_url":"https://api.github.com/repos/PacemakerConf/site/statuses/72e3d1f9a7864ca0149a841de85427f9feeb1920","head":{"label":"PacemakerConf:bugfix","ref":"bugfix","sha":"72e3d1f9a7864ca0149a841de85427f9feeb1920","user":{"login":"PacemakerConf","id":10564588,"avatar_url":"https://avatars.githubusercontent.com/u/10564588?v=3","gravatar_id":"","url":"https://api.github.com/users/PacemakerConf","html_url":"https://github.com/PacemakerConf","followers_url":"https://api.github.com/users/PacemakerConf/followers","following_url":"https://api.github.com/users/PacemakerConf/following{/other_user}","gists_url":"https://api.github.com/users/PacemakerConf/gists{/gist_id}","starred_url":"https://api.github.com/users/PacemakerConf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PacemakerConf/subscriptions","organizations_url":"https://api.github.com/users/PacemakerConf/orgs","repos_url":"https://api.github.com/users/PacemakerConf/repos","events_url":"https://api.github.com/users/PacemakerConf/events{/privacy}","received_events_url":"https://api.github.com/users/PacemakerConf/received_events","type":"Organization","site_admin":false},"repo":{"id":29359568,"name":"site","full_name":"PacemakerConf/site","owner":{"login":"PacemakerConf","id":10564588,"avatar_url":"https://avatars.githubusercontent.com/u/10564588?v=3","gravatar_id":"","url":"https://api.github.com/users/PacemakerConf","html_url":"https://github.com/PacemakerConf","followers_url":"https://api.github.com/users/PacemakerConf/followers","following_url":"https://api.github.com/users/PacemakerConf/following{/other_user}","gists_url":"https://api.github.com/users/PacemakerConf/gists{/gist_id}","starred_url":"https://api.github.com/users/PacemakerConf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PacemakerConf/subscriptions","organizations_url":"https://api.github.com/users/PacemakerConf/orgs","repos_url":"https://api.github.com/users/PacemakerConf/repos","events_url":"https://api.github.com/users/PacemakerConf/events{/privacy}","received_events_url":"https://api.github.com/users/PacemakerConf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PacemakerConf/site","description":"Site for Pacemaker Conference at SoftServe","fork":false,"url":"https://api.github.com/repos/PacemakerConf/site","forks_url":"https://api.github.com/repos/PacemakerConf/site/forks","keys_url":"https://api.github.com/repos/PacemakerConf/site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PacemakerConf/site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PacemakerConf/site/teams","hooks_url":"https://api.github.com/repos/PacemakerConf/site/hooks","issue_events_url":"https://api.github.com/repos/PacemakerConf/site/issues/events{/number}","events_url":"https://api.github.com/repos/PacemakerConf/site/events","assignees_url":"https://api.github.com/repos/PacemakerConf/site/assignees{/user}","branches_url":"https://api.github.com/repos/PacemakerConf/site/branches{/branch}","tags_url":"https://api.github.com/repos/PacemakerConf/site/tags","blobs_url":"https://api.github.com/repos/PacemakerConf/site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PacemakerConf/site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PacemakerConf/site/git/refs{/sha}","trees_url":"https://api.github.com/repos/PacemakerConf/site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PacemakerConf/site/statuses/{sha}","languages_url":"https://api.github.com/repos/PacemakerConf/site/languages","stargazers_url":"https://api.github.com/repos/PacemakerConf/site/stargazers","contributors_url":"https://api.github.com/repos/PacemakerConf/site/contributors","subscribers_url":"https://api.github.com/repos/PacemakerConf/site/subscribers","subscription_url":"https://api.github.com/repos/PacemakerConf/site/subscription","commits_url":"https://api.github.com/repos/PacemakerConf/site/commits{/sha}","git_commits_url":"https://api.github.com/repos/PacemakerConf/site/git/commits{/sha}","comments_url":"https://api.github.com/repos/PacemakerConf/site/comments{/number}","issue_comment_url":"https://api.github.com/repos/PacemakerConf/site/issues/comments{/number}","contents_url":"https://api.github.com/repos/PacemakerConf/site/contents/{+path}","compare_url":"https://api.github.com/repos/PacemakerConf/site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PacemakerConf/site/merges","archive_url":"https://api.github.com/repos/PacemakerConf/site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PacemakerConf/site/downloads","issues_url":"https://api.github.com/repos/PacemakerConf/site/issues{/number}","pulls_url":"https://api.github.com/repos/PacemakerConf/site/pulls{/number}","milestones_url":"https://api.github.com/repos/PacemakerConf/site/milestones{/number}","notifications_url":"https://api.github.com/repos/PacemakerConf/site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PacemakerConf/site/labels{/name}","releases_url":"https://api.github.com/repos/PacemakerConf/site/releases{/id}","deployments_url":"https://api.github.com/repos/PacemakerConf/site/deployments","created_at":"2015-01-16T17:31:55Z","updated_at":"2016-02-17T23:34:51Z","pushed_at":"2016-06-17T13:17:39Z","git_url":"git://github.com/PacemakerConf/site.git","ssh_url":"git@github.com:PacemakerConf/site.git","clone_url":"https://github.com/PacemakerConf/site.git","svn_url":"https://github.com/PacemakerConf/site","homepage":null,"size":29584,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"PacemakerConf:master","ref":"master","sha":"daec18748fd232e4b164ab32f563e40ca49c6f92","user":{"login":"PacemakerConf","id":10564588,"avatar_url":"https://avatars.githubusercontent.com/u/10564588?v=3","gravatar_id":"","url":"https://api.github.com/users/PacemakerConf","html_url":"https://github.com/PacemakerConf","followers_url":"https://api.github.com/users/PacemakerConf/followers","following_url":"https://api.github.com/users/PacemakerConf/following{/other_user}","gists_url":"https://api.github.com/users/PacemakerConf/gists{/gist_id}","starred_url":"https://api.github.com/users/PacemakerConf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PacemakerConf/subscriptions","organizations_url":"https://api.github.com/users/PacemakerConf/orgs","repos_url":"https://api.github.com/users/PacemakerConf/repos","events_url":"https://api.github.com/users/PacemakerConf/events{/privacy}","received_events_url":"https://api.github.com/users/PacemakerConf/received_events","type":"Organization","site_admin":false},"repo":{"id":29359568,"name":"site","full_name":"PacemakerConf/site","owner":{"login":"PacemakerConf","id":10564588,"avatar_url":"https://avatars.githubusercontent.com/u/10564588?v=3","gravatar_id":"","url":"https://api.github.com/users/PacemakerConf","html_url":"https://github.com/PacemakerConf","followers_url":"https://api.github.com/users/PacemakerConf/followers","following_url":"https://api.github.com/users/PacemakerConf/following{/other_user}","gists_url":"https://api.github.com/users/PacemakerConf/gists{/gist_id}","starred_url":"https://api.github.com/users/PacemakerConf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PacemakerConf/subscriptions","organizations_url":"https://api.github.com/users/PacemakerConf/orgs","repos_url":"https://api.github.com/users/PacemakerConf/repos","events_url":"https://api.github.com/users/PacemakerConf/events{/privacy}","received_events_url":"https://api.github.com/users/PacemakerConf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PacemakerConf/site","description":"Site for Pacemaker Conference at SoftServe","fork":false,"url":"https://api.github.com/repos/PacemakerConf/site","forks_url":"https://api.github.com/repos/PacemakerConf/site/forks","keys_url":"https://api.github.com/repos/PacemakerConf/site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PacemakerConf/site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PacemakerConf/site/teams","hooks_url":"https://api.github.com/repos/PacemakerConf/site/hooks","issue_events_url":"https://api.github.com/repos/PacemakerConf/site/issues/events{/number}","events_url":"https://api.github.com/repos/PacemakerConf/site/events","assignees_url":"https://api.github.com/repos/PacemakerConf/site/assignees{/user}","branches_url":"https://api.github.com/repos/PacemakerConf/site/branches{/branch}","tags_url":"https://api.github.com/repos/PacemakerConf/site/tags","blobs_url":"https://api.github.com/repos/PacemakerConf/site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PacemakerConf/site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PacemakerConf/site/git/refs{/sha}","trees_url":"https://api.github.com/repos/PacemakerConf/site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PacemakerConf/site/statuses/{sha}","languages_url":"https://api.github.com/repos/PacemakerConf/site/languages","stargazers_url":"https://api.github.com/repos/PacemakerConf/site/stargazers","contributors_url":"https://api.github.com/repos/PacemakerConf/site/contributors","subscribers_url":"https://api.github.com/repos/PacemakerConf/site/subscribers","subscription_url":"https://api.github.com/repos/PacemakerConf/site/subscription","commits_url":"https://api.github.com/repos/PacemakerConf/site/commits{/sha}","git_commits_url":"https://api.github.com/repos/PacemakerConf/site/git/commits{/sha}","comments_url":"https://api.github.com/repos/PacemakerConf/site/comments{/number}","issue_comment_url":"https://api.github.com/repos/PacemakerConf/site/issues/comments{/number}","contents_url":"https://api.github.com/repos/PacemakerConf/site/contents/{+path}","compare_url":"https://api.github.com/repos/PacemakerConf/site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PacemakerConf/site/merges","archive_url":"https://api.github.com/repos/PacemakerConf/site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PacemakerConf/site/downloads","issues_url":"https://api.github.com/repos/PacemakerConf/site/issues{/number}","pulls_url":"https://api.github.com/repos/PacemakerConf/site/pulls{/number}","milestones_url":"https://api.github.com/repos/PacemakerConf/site/milestones{/number}","notifications_url":"https://api.github.com/repos/PacemakerConf/site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PacemakerConf/site/labels{/name}","releases_url":"https://api.github.com/repos/PacemakerConf/site/releases{/id}","deployments_url":"https://api.github.com/repos/PacemakerConf/site/deployments","created_at":"2015-01-16T17:31:55Z","updated_at":"2016-02-17T23:34:51Z","pushed_at":"2016-06-17T13:17:39Z","git_url":"git://github.com/PacemakerConf/site.git","ssh_url":"git@github.com:PacemakerConf/site.git","clone_url":"https://github.com/PacemakerConf/site.git","svn_url":"https://github.com/PacemakerConf/site","homepage":null,"size":29584,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/8"},"html":{"href":"https://github.com/PacemakerConf/site/pull/8"},"issue":{"href":"https://api.github.com/repos/PacemakerConf/site/issues/8"},"comments":{"href":"https://api.github.com/repos/PacemakerConf/site/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PacemakerConf/site/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/PacemakerConf/site/statuses/72e3d1f9a7864ca0149a841de85427f9feeb1920"}}}}
{"actor":{"display_login":"forecome"}}