{"action":"created","comment":{"url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/comments/25942667","id":25942667,"diff_hunk":"@@ -1,17 +1,61 @@\n $(document).ready(function(){\n \n-    //double click-submission protection\n-    $('.submitter, form a, form [type=\"submit\"], form button').click(function (event) {\n-        if ($(this).hasClass(\"disabled\")) {\n+    // double click-submission protection for create/update button\n+    $('.modal-form').submit(function (event) {\n+        var $submit_button = $(this).find('.modal-submit');\n+        if ($submit_button.hasClass(\"disabled\")) {\n             event.preventDefault();\n         }\n-        $(this).addClass(\"disabled\");\n+        else {\n+            // disables create/update button, cancel link, and form inputs\n+            $submit_button.addClass(\"disabled\");\n+            $submit_button.siblings('.modal-cancel').addClass(\"disabled\");\n+        }\n     });\n \n     function is_valid_url(url) {\n+        //if URL input element is used, this should match the pattern attribute or the custom validation\n         return /^(http(s)?:\\/\\/)?(www\\.)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/i.test(url);\n     }\n \n+    function enable_submit_if_no_errors() {","path":"ab_tool/static/ab_tool/js/experiments_dashboard.js","position":25,"original_position":25,"commit_id":"fbf4bcc6decb3498445a86f52a8969dc41e3cbe0","original_commit_id":"fbf4bcc6decb3498445a86f52a8969dc41e3cbe0","user":{"login":"roderickmorales","id":1260455,"avatar_url":"https://avatars.githubusercontent.com/u/1260455?v=3","gravatar_id":"","url":"https://api.github.com/users/roderickmorales","html_url":"https://github.com/roderickmorales","followers_url":"https://api.github.com/users/roderickmorales/followers","following_url":"https://api.github.com/users/roderickmorales/following{/other_user}","gists_url":"https://api.github.com/users/roderickmorales/gists{/gist_id}","starred_url":"https://api.github.com/users/roderickmorales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roderickmorales/subscriptions","organizations_url":"https://api.github.com/users/roderickmorales/orgs","repos_url":"https://api.github.com/users/roderickmorales/repos","events_url":"https://api.github.com/users/roderickmorales/events{/privacy}","received_events_url":"https://api.github.com/users/roderickmorales/received_events","type":"User","site_admin":false},"body":"For this to work you need to add .clean to ALL input fields. How you have it now, you are able to submit the form by just filling out the Name of the intervention. As far as I know we don't want to allow creation of intervention points with empty URLs. We should talk about making this work better.","created_at":"2015-03-06T12:56:56Z","updated_at":"2015-03-06T12:56:56Z","html_url":"https://github.com/penzance/ab-testing-tool/pull/150#discussion_r25942667","pull_request_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/comments/25942667"},"html":{"href":"https://github.com/penzance/ab-testing-tool/pull/150#discussion_r25942667"},"pull_request":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150","id":30617185,"html_url":"https://github.com/penzance/ab-testing-tool/pull/150","diff_url":"https://github.com/penzance/ab-testing-tool/pull/150.diff","patch_url":"https://github.com/penzance/ab-testing-tool/pull/150.patch","issue_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/150","number":150,"state":"open","locked":false,"title":"Bugfix/tlt 924 create button disabled adding intervention point","user":{"login":"elliottyates","id":8975317,"avatar_url":"https://avatars.githubusercontent.com/u/8975317?v=3","gravatar_id":"","url":"https://api.github.com/users/elliottyates","html_url":"https://github.com/elliottyates","followers_url":"https://api.github.com/users/elliottyates/followers","following_url":"https://api.github.com/users/elliottyates/following{/other_user}","gists_url":"https://api.github.com/users/elliottyates/gists{/gist_id}","starred_url":"https://api.github.com/users/elliottyates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliottyates/subscriptions","organizations_url":"https://api.github.com/users/elliottyates/orgs","repos_url":"https://api.github.com/users/elliottyates/repos","events_url":"https://api.github.com/users/elliottyates/events{/privacy}","received_events_url":"https://api.github.com/users/elliottyates/received_events","type":"User","site_admin":false},"body":"fixes url validation inconsistency between element validation and custom validation regex; fixes disabled button issues on IP modal","created_at":"2015-03-06T02:52:08Z","updated_at":"2015-03-06T12:56:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de373a0e937eff2749ebccf92506fda18351988b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150/commits","review_comments_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150/comments","review_comment_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/150/comments","statuses_url":"https://api.github.com/repos/penzance/ab-testing-tool/statuses/fbf4bcc6decb3498445a86f52a8969dc41e3cbe0","head":{"label":"penzance:bugfix/TLT-924_create_button_disabled_adding_intervention_point","ref":"bugfix/TLT-924_create_button_disabled_adding_intervention_point","sha":"fbf4bcc6decb3498445a86f52a8969dc41e3cbe0","user":{"login":"penzance","id":7885127,"avatar_url":"https://avatars.githubusercontent.com/u/7885127?v=3","gravatar_id":"","url":"https://api.github.com/users/penzance","html_url":"https://github.com/penzance","followers_url":"https://api.github.com/users/penzance/followers","following_url":"https://api.github.com/users/penzance/following{/other_user}","gists_url":"https://api.github.com/users/penzance/gists{/gist_id}","starred_url":"https://api.github.com/users/penzance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penzance/subscriptions","organizations_url":"https://api.github.com/users/penzance/orgs","repos_url":"https://api.github.com/users/penzance/repos","events_url":"https://api.github.com/users/penzance/events{/privacy}","received_events_url":"https://api.github.com/users/penzance/received_events","type":"Organization","site_admin":false},"repo":{"id":22353530,"name":"ab-testing-tool","full_name":"penzance/ab-testing-tool","owner":{"login":"penzance","id":7885127,"avatar_url":"https://avatars.githubusercontent.com/u/7885127?v=3","gravatar_id":"","url":"https://api.github.com/users/penzance","html_url":"https://github.com/penzance","followers_url":"https://api.github.com/users/penzance/followers","following_url":"https://api.github.com/users/penzance/following{/other_user}","gists_url":"https://api.github.com/users/penzance/gists{/gist_id}","starred_url":"https://api.github.com/users/penzance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penzance/subscriptions","organizations_url":"https://api.github.com/users/penzance/orgs","repos_url":"https://api.github.com/users/penzance/repos","events_url":"https://api.github.com/users/penzance/events{/privacy}","received_events_url":"https://api.github.com/users/penzance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/penzance/ab-testing-tool","description":"stage","fork":false,"url":"https://api.github.com/repos/penzance/ab-testing-tool","forks_url":"https://api.github.com/repos/penzance/ab-testing-tool/forks","keys_url":"https://api.github.com/repos/penzance/ab-testing-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/penzance/ab-testing-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/penzance/ab-testing-tool/teams","hooks_url":"https://api.github.com/repos/penzance/ab-testing-tool/hooks","issue_events_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/events{/number}","events_url":"https://api.github.com/repos/penzance/ab-testing-tool/events","assignees_url":"https://api.github.com/repos/penzance/ab-testing-tool/assignees{/user}","branches_url":"https://api.github.com/repos/penzance/ab-testing-tool/branches{/branch}","tags_url":"https://api.github.com/repos/penzance/ab-testing-tool/tags","blobs_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/penzance/ab-testing-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/penzance/ab-testing-tool/languages","stargazers_url":"https://api.github.com/repos/penzance/ab-testing-tool/stargazers","contributors_url":"https://api.github.com/repos/penzance/ab-testing-tool/contributors","subscribers_url":"https://api.github.com/repos/penzance/ab-testing-tool/subscribers","subscription_url":"https://api.github.com/repos/penzance/ab-testing-tool/subscription","commits_url":"https://api.github.com/repos/penzance/ab-testing-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/penzance/ab-testing-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/penzance/ab-testing-tool/contents/{+path}","compare_url":"https://api.github.com/repos/penzance/ab-testing-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/penzance/ab-testing-tool/merges","archive_url":"https://api.github.com/repos/penzance/ab-testing-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/penzance/ab-testing-tool/downloads","issues_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues{/number}","pulls_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/penzance/ab-testing-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/penzance/ab-testing-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/penzance/ab-testing-tool/labels{/name}","releases_url":"https://api.github.com/repos/penzance/ab-testing-tool/releases{/id}","created_at":"2014-07-28T18:39:09Z","updated_at":"2015-02-20T20:28:43Z","pushed_at":"2015-03-06T02:57:27Z","git_url":"git://github.com/penzance/ab-testing-tool.git","ssh_url":"git@github.com:penzance/ab-testing-tool.git","clone_url":"https://github.com/penzance/ab-testing-tool.git","svn_url":"https://github.com/penzance/ab-testing-tool","homepage":"","size":4372,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"penzance:develop","ref":"develop","sha":"78ae6d751e709e24e7bcd923ddbdc0d020ac8ff2","user":{"login":"penzance","id":7885127,"avatar_url":"https://avatars.githubusercontent.com/u/7885127?v=3","gravatar_id":"","url":"https://api.github.com/users/penzance","html_url":"https://github.com/penzance","followers_url":"https://api.github.com/users/penzance/followers","following_url":"https://api.github.com/users/penzance/following{/other_user}","gists_url":"https://api.github.com/users/penzance/gists{/gist_id}","starred_url":"https://api.github.com/users/penzance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penzance/subscriptions","organizations_url":"https://api.github.com/users/penzance/orgs","repos_url":"https://api.github.com/users/penzance/repos","events_url":"https://api.github.com/users/penzance/events{/privacy}","received_events_url":"https://api.github.com/users/penzance/received_events","type":"Organization","site_admin":false},"repo":{"id":22353530,"name":"ab-testing-tool","full_name":"penzance/ab-testing-tool","owner":{"login":"penzance","id":7885127,"avatar_url":"https://avatars.githubusercontent.com/u/7885127?v=3","gravatar_id":"","url":"https://api.github.com/users/penzance","html_url":"https://github.com/penzance","followers_url":"https://api.github.com/users/penzance/followers","following_url":"https://api.github.com/users/penzance/following{/other_user}","gists_url":"https://api.github.com/users/penzance/gists{/gist_id}","starred_url":"https://api.github.com/users/penzance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penzance/subscriptions","organizations_url":"https://api.github.com/users/penzance/orgs","repos_url":"https://api.github.com/users/penzance/repos","events_url":"https://api.github.com/users/penzance/events{/privacy}","received_events_url":"https://api.github.com/users/penzance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/penzance/ab-testing-tool","description":"stage","fork":false,"url":"https://api.github.com/repos/penzance/ab-testing-tool","forks_url":"https://api.github.com/repos/penzance/ab-testing-tool/forks","keys_url":"https://api.github.com/repos/penzance/ab-testing-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/penzance/ab-testing-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/penzance/ab-testing-tool/teams","hooks_url":"https://api.github.com/repos/penzance/ab-testing-tool/hooks","issue_events_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/events{/number}","events_url":"https://api.github.com/repos/penzance/ab-testing-tool/events","assignees_url":"https://api.github.com/repos/penzance/ab-testing-tool/assignees{/user}","branches_url":"https://api.github.com/repos/penzance/ab-testing-tool/branches{/branch}","tags_url":"https://api.github.com/repos/penzance/ab-testing-tool/tags","blobs_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/penzance/ab-testing-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/penzance/ab-testing-tool/languages","stargazers_url":"https://api.github.com/repos/penzance/ab-testing-tool/stargazers","contributors_url":"https://api.github.com/repos/penzance/ab-testing-tool/contributors","subscribers_url":"https://api.github.com/repos/penzance/ab-testing-tool/subscribers","subscription_url":"https://api.github.com/repos/penzance/ab-testing-tool/subscription","commits_url":"https://api.github.com/repos/penzance/ab-testing-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/penzance/ab-testing-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/penzance/ab-testing-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/penzance/ab-testing-tool/contents/{+path}","compare_url":"https://api.github.com/repos/penzance/ab-testing-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/penzance/ab-testing-tool/merges","archive_url":"https://api.github.com/repos/penzance/ab-testing-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/penzance/ab-testing-tool/downloads","issues_url":"https://api.github.com/repos/penzance/ab-testing-tool/issues{/number}","pulls_url":"https://api.github.com/repos/penzance/ab-testing-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/penzance/ab-testing-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/penzance/ab-testing-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/penzance/ab-testing-tool/labels{/name}","releases_url":"https://api.github.com/repos/penzance/ab-testing-tool/releases{/id}","created_at":"2014-07-28T18:39:09Z","updated_at":"2015-02-20T20:28:43Z","pushed_at":"2015-03-06T02:57:27Z","git_url":"git://github.com/penzance/ab-testing-tool.git","ssh_url":"git@github.com:penzance/ab-testing-tool.git","clone_url":"https://github.com/penzance/ab-testing-tool.git","svn_url":"https://github.com/penzance/ab-testing-tool","homepage":"","size":4372,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150"},"html":{"href":"https://github.com/penzance/ab-testing-tool/pull/150"},"issue":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/issues/150"},"comments":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/penzance/ab-testing-tool/statuses/fbf4bcc6decb3498445a86f52a8969dc41e3cbe0"}}}}