{"action":"created","comment":{"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments/190741907","pull_request_review_id":123186137,"id":190741907,"diff_hunk":"@@ -63,15 +66,44 @@ $(document).ready(function () {\n     $(\"#request-agency\").change(function () {\n         getRequestAgencyInstructions();\n         toggleRequestAgencyInstructions(\"show\");\n+        $(\".appended-div\").remove(); // remove the appended divs from previous agency\n+        previousValues = [];\n+        currentValues = [];\n         getCustomRequestForms($(\"#request-agency\").val());\n     });\n \n     $(\"#request-agency-instructions-toggle\").click(function () {\n         toggleRequestAgencyInstructions(\"default\");\n     });\n \n-    $(\"#request-type\").change(function () {\n-        renderCustomRequestForm();\n+    // render a new form every time a request type dropdown is changed\n+    $(document).on(\"focus\", \".request-type\", function () {\n+        var target = document.activeElement.id;\n+        target = target.replace(\"request-type-\", \"\");\n+        var targetId = \"#\" + document.activeElement.id;\n+        $(targetId).off().change(function () {\n+            renderCustomRequestForm(target);\n+        });\n+    });\n+\n+    // determine which dismiss button is being clicked\n+    $(document).on(\"click\", \".panel-dismiss\", function () {\n+        dismissTarget = \"#\" + document.activeElement.id;\n+    });\n+\n+    // append a new dropdown and content div every time the additional content button is clicked\n+    $(\"#custom-request-form-additional-content\").click(function () {\n+        customRequestFormCounter = customRequestFormCounter + 1;","path":"app/static/js/request/new-request-anon.js","position":43,"original_position":43,"commit_id":"6d90b5b8fd6e14ab6ce5a535a0fdae7093791de6","original_commit_id":"6d90b5b8fd6e14ab6ce5a535a0fdae7093791de6","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: ['customRequestFormCounter' is not defined. (no-undef)](https://app.codacy.com/app/NYCRecords/NYCOpenRecords/pullRequest?prid=1676405)","created_at":"2018-05-24T21:52:30Z","updated_at":"2018-05-24T21:52:30Z","html_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368#discussion_r190741907","pull_request_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments/190741907"},"html":{"href":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368#discussion_r190741907"},"pull_request":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368"}}},"pull_request":{"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368","id":189487973,"html_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368","diff_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368.diff","patch_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368.patch","issue_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/368","number":368,"state":"open","locked":false,"title":"Feature/OP-1436: Front-End for Custom Request Forms (Javascript)","user":{"login":"johnyu95","id":20359562,"avatar_url":"https://avatars2.githubusercontent.com/u/20359562?v=4","gravatar_id":"","url":"https://api.github.com/users/johnyu95","html_url":"https://github.com/johnyu95","followers_url":"https://api.github.com/users/johnyu95/followers","following_url":"https://api.github.com/users/johnyu95/following{/other_user}","gists_url":"https://api.github.com/users/johnyu95/gists{/gist_id}","starred_url":"https://api.github.com/users/johnyu95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnyu95/subscriptions","organizations_url":"https://api.github.com/users/johnyu95/orgs","repos_url":"https://api.github.com/users/johnyu95/repos","events_url":"https://api.github.com/users/johnyu95/events{/privacy}","received_events_url":"https://api.github.com/users/johnyu95/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-21T21:05:06Z","updated_at":"2018-05-24T21:52:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"391ae350aebfbc42a5d21113ff88fb671d5532f8","assignee":{"login":"joelbcastillo","id":3308161,"avatar_url":"https://avatars1.githubusercontent.com/u/3308161?v=4","gravatar_id":"","url":"https://api.github.com/users/joelbcastillo","html_url":"https://github.com/joelbcastillo","followers_url":"https://api.github.com/users/joelbcastillo/followers","following_url":"https://api.github.com/users/joelbcastillo/following{/other_user}","gists_url":"https://api.github.com/users/joelbcastillo/gists{/gist_id}","starred_url":"https://api.github.com/users/joelbcastillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelbcastillo/subscriptions","organizations_url":"https://api.github.com/users/joelbcastillo/orgs","repos_url":"https://api.github.com/users/joelbcastillo/repos","events_url":"https://api.github.com/users/joelbcastillo/events{/privacy}","received_events_url":"https://api.github.com/users/joelbcastillo/received_events","type":"User","site_admin":false},"assignees":[{"login":"joelbcastillo","id":3308161,"avatar_url":"https://avatars1.githubusercontent.com/u/3308161?v=4","gravatar_id":"","url":"https://api.github.com/users/joelbcastillo","html_url":"https://github.com/joelbcastillo","followers_url":"https://api.github.com/users/joelbcastillo/followers","following_url":"https://api.github.com/users/joelbcastillo/following{/other_user}","gists_url":"https://api.github.com/users/joelbcastillo/gists{/gist_id}","starred_url":"https://api.github.com/users/joelbcastillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelbcastillo/subscriptions","organizations_url":"https://api.github.com/users/joelbcastillo/orgs","repos_url":"https://api.github.com/users/joelbcastillo/repos","events_url":"https://api.github.com/users/joelbcastillo/events{/privacy}","received_events_url":"https://api.github.com/users/joelbcastillo/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368/commits","review_comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368/comments","review_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/368/comments","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/6d90b5b8fd6e14ab6ce5a535a0fdae7093791de6","head":{"label":"CityOfNewYork:feature/OP-1436","ref":"feature/OP-1436","sha":"6d90b5b8fd6e14ab6ce5a535a0fdae7093791de6","user":{"login":"CityOfNewYork","id":1107978,"avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"repo":{"id":36671696,"name":"NYCOpenRecords","full_name":"CityOfNewYork/NYCOpenRecords","owner":{"login":"CityOfNewYork","id":1107978,"avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfNewYork/NYCOpenRecords","description":"A web application to submit and view Freedom of Information Law requests","fork":false,"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords","forks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/forks","keys_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/teams","hooks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/hooks","issue_events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/events","assignees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/tags","blobs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/languages","stargazers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/stargazers","contributors_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contributors","subscribers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscribers","subscription_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscription","commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/merges","archive_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/downloads","issues_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/labels{/name}","releases_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/deployments","created_at":"2015-06-01T15:56:23Z","updated_at":"2018-05-24T18:54:17Z","pushed_at":"2018-05-24T20:13:44Z","git_url":"git://github.com/CityOfNewYork/NYCOpenRecords.git","ssh_url":"git@github.com:CityOfNewYork/NYCOpenRecords.git","clone_url":"https://github.com/CityOfNewYork/NYCOpenRecords.git","svn_url":"https://github.com/CityOfNewYork/NYCOpenRecords","homepage":"http://nyc.gov/openrecords","size":47389,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":4,"watchers":25,"default_branch":"develop"}},"base":{"label":"CityOfNewYork:develop","ref":"develop","sha":"c6bab231751c5d3f4af9709e416db00d42d98e86","user":{"login":"CityOfNewYork","id":1107978,"avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"repo":{"id":36671696,"name":"NYCOpenRecords","full_name":"CityOfNewYork/NYCOpenRecords","owner":{"login":"CityOfNewYork","id":1107978,"avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfNewYork/NYCOpenRecords","description":"A web application to submit and view Freedom of Information Law requests","fork":false,"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords","forks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/forks","keys_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/teams","hooks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/hooks","issue_events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/events","assignees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/tags","blobs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/languages","stargazers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/stargazers","contributors_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contributors","subscribers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscribers","subscription_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscription","commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/merges","archive_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/downloads","issues_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/labels{/name}","releases_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/deployments","created_at":"2015-06-01T15:56:23Z","updated_at":"2018-05-24T18:54:17Z","pushed_at":"2018-05-24T20:13:44Z","git_url":"git://github.com/CityOfNewYork/NYCOpenRecords.git","ssh_url":"git@github.com:CityOfNewYork/NYCOpenRecords.git","clone_url":"https://github.com/CityOfNewYork/NYCOpenRecords.git","svn_url":"https://github.com/CityOfNewYork/NYCOpenRecords","homepage":"http://nyc.gov/openrecords","size":47389,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":4,"watchers":25,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368"},"html":{"href":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/368"},"issue":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/368"},"comments":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/368/comments"},"review_comments":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368/comments"},"review_comment":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/368/commits"},"statuses":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/6d90b5b8fd6e14ab6ce5a535a0fdae7093791de6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codacy-bot"}}