{"action":"created","comment":{"url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments/192396163","pull_request_review_id":125164903,"id":192396163,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjM5NjE2Mw==","diff_hunk":"@@ -0,0 +1,104 @@\n+/**\n+ * Created by Jignesh Nakrani on 18/8/15,\n+ * Updated By Yahil Madakiya on 26/9/16,\n+ * Moved to rtMedia core by Malav Vasita on 30/05/2018.\n+ */\n+\n+/**\n+ * Add Validation For Extra New Field\n+ * Remove Functionality And Create Function For Decrease Code. :)\n+ * By: Yahil and Malav\n+ */\n+jQuery( document ).ready( function ( $ ) {\n+    var error_count = 0;\n+    var general_enable_upload_terms               = jQuery('input[name^=\"rtmedia-options[general_enable_upload_terms]\"]');\n+    var activity_enable_upload_terms              = jQuery('input[name^=\"rtmedia-options[activity_enable_upload_terms]\"]');\n+    var general_upload_terms_page_link            = jQuery('input[name^=\"rtmedia-options[general_upload_terms_page_link]\"]');\n+    var general_upload_terms_message              = jQuery('input[name^=\"rtmedia-options[general_upload_terms_message]\"]');\n+    var general_upload_terms_error_message        = jQuery('input[name^=\"rtmedia-options[general_upload_terms_error_message]\"]');\n+    var general_upload_terms_show_pricacy_message = jQuery('input[name^=\"rtmedia-options[general_upload_terms_show_pricacy_message]\"]');\n+    var general_upload_terms_privacy_message      = jQuery('textarea[name^=\"rtmedia-options[general_upload_terms_privacy_message]\"]');\n+\n+    rtp_terms_option_toggle();\n+    jQuery('input[name^=\"rtmedia-options[general_enable_upload_terms]\"], input[name^=\"rtmedia-options[activity_enable_upload_terms]\"], input[name^=\"rtmedia-options[general_upload_terms_show_pricacy_message]\"]').change(function(){\n+        rtp_terms_option_toggle();\n+    });\n+    jQuery('#bp-media-settings-boxes').on('submit', '#bp_media_settings_form, .rtmedia-settings-submit', function (e) {\n+        var return_code = true;\n+\n+        if (return_code && general_enable_upload_terms.length > 0 && typeof general_enable_upload_terms != \"undefined\" ||\n+            return_code && activity_enable_upload_terms.length > 0 && typeof activity_enable_upload_terms != \"undefined\" )\n+        {\n+            var error_msg = \"\";\n+            if (general_enable_upload_terms.prop('checked') == true || activity_enable_upload_terms.prop('checked') == true)\n+            {\n+                jQuery( '.error_msg' ).remove();\n+                jQuery( '.rtm-form-text' ).css('border-color', '#ddd');\n+                if (!/^(http|https|ftp):\\/\\/[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/i.test(general_upload_terms_page_link.val())) {\n+                    error_msg += 'Please enter valid URL.';\n+                    return rtp_show_error_message ( general_upload_terms_page_link, error_msg );\n+                }\n+\n+                /* Check \"Terms of Service Message\" Emply Or Not */\n+                if ( general_upload_terms_message.val().trim() == '') {\n+                     error_msg += 'Please enter terms message.';\n+                    return rtp_show_error_message ( general_upload_terms_message, error_msg );\n+                }\n+\n+                /* Check \"Error Message\" Emply Or Not */\n+                if ( general_upload_terms_error_message.val().trim() == '') {\n+                     error_msg += 'Please enter error message.';\n+                    return rtp_show_error_message ( general_upload_terms_error_message, error_msg );\n+                }\n+            }\n+        }\n+        if(return_code && general_upload_terms_show_pricacy_message.length > 0 && typeof general_upload_terms_show_pricacy_message != \"undefined\") {\n+            var error_msg = \"\";\n+            if ( general_upload_terms_show_pricacy_message.prop('checked') ) {\n+                jQuery( '.error_msg' ).remove();\n+\n+                /* Check \"Terms of Service Message\" Emply Or Not */\n+                if ( general_upload_terms_privacy_message.val().trim() == '') {\n+                     error_msg += 'Please enter privacy message.';\n+                    return rtp_show_error_message ( general_upload_terms_privacy_message, error_msg );\n+                }\n+            }\n+        }\n+    });\n+\n+    /* Show Error Message If Incorrect Validation  */\n+    function rtp_show_error_message ( selector, error_msg ) {","path":"app/assets/js/admin-upload-terms.js","position":70,"original_position":70,"commit_id":"1a914d377d55fce912858ffef9bc06d640b46a52","original_commit_id":"1a914d377d55fce912858ffef9bc06d640b46a52","user":{"login":"SID177","id":23107546,"node_id":"MDQ6VXNlcjIzMTA3NTQ2","avatar_url":"https://avatars0.githubusercontent.com/u/23107546?v=4","gravatar_id":"","url":"https://api.github.com/users/SID177","html_url":"https://github.com/SID177","followers_url":"https://api.github.com/users/SID177/followers","following_url":"https://api.github.com/users/SID177/following{/other_user}","gists_url":"https://api.github.com/users/SID177/gists{/gist_id}","starred_url":"https://api.github.com/users/SID177/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SID177/subscriptions","organizations_url":"https://api.github.com/users/SID177/orgs","repos_url":"https://api.github.com/users/SID177/repos","events_url":"https://api.github.com/users/SID177/events{/privacy}","received_events_url":"https://api.github.com/users/SID177/received_events","type":"User","site_admin":false},"body":"Remove space after `rtp_show_error_message`. @malavasita ","created_at":"2018-06-01T13:30:52Z","updated_at":"2018-06-01T13:57:53Z","html_url":"https://github.com/rtMediaWP/rtMedia/pull/1110#discussion_r192396163","pull_request_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments/192396163"},"html":{"href":"https://github.com/rtMediaWP/rtMedia/pull/1110#discussion_r192396163"},"pull_request":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110"}}},"pull_request":{"url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110","id":191644879,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjQ0ODc5","html_url":"https://github.com/rtMediaWP/rtMedia/pull/1110","diff_url":"https://github.com/rtMediaWP/rtMedia/pull/1110.diff","patch_url":"https://github.com/rtMediaWP/rtMedia/pull/1110.patch","issue_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1110","number":1110,"state":"open","locked":false,"title":"Integrated Upload Terms in core rtMedia","user":{"login":"malavasita","id":25079043,"node_id":"MDQ6VXNlcjI1MDc5MDQz","avatar_url":"https://avatars1.githubusercontent.com/u/25079043?v=4","gravatar_id":"","url":"https://api.github.com/users/malavasita","html_url":"https://github.com/malavasita","followers_url":"https://api.github.com/users/malavasita/followers","following_url":"https://api.github.com/users/malavasita/following{/other_user}","gists_url":"https://api.github.com/users/malavasita/gists{/gist_id}","starred_url":"https://api.github.com/users/malavasita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malavasita/subscriptions","organizations_url":"https://api.github.com/users/malavasita/orgs","repos_url":"https://api.github.com/users/malavasita/repos","events_url":"https://api.github.com/users/malavasita/events{/privacy}","received_events_url":"https://api.github.com/users/malavasita/received_events","type":"User","site_admin":false},"body":"Paid plugin \"rtmedia-upload-terms\" has been integrated in \"rtMedia\" core plugin because of GDPR","created_at":"2018-05-31T05:05:02Z","updated_at":"2018-06-01T13:57:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1dd7124d2582859d1ccc2d38c3a8acc465bdeb09","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110/commits","review_comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110/comments","review_comment_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1110/comments","statuses_url":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/1a914d377d55fce912858ffef9bc06d640b46a52","head":{"label":"malavasita:rtmedia-upload-terms","ref":"rtmedia-upload-terms","sha":"1a914d377d55fce912858ffef9bc06d640b46a52","user":{"login":"malavasita","id":25079043,"node_id":"MDQ6VXNlcjI1MDc5MDQz","avatar_url":"https://avatars1.githubusercontent.com/u/25079043?v=4","gravatar_id":"","url":"https://api.github.com/users/malavasita","html_url":"https://github.com/malavasita","followers_url":"https://api.github.com/users/malavasita/followers","following_url":"https://api.github.com/users/malavasita/following{/other_user}","gists_url":"https://api.github.com/users/malavasita/gists{/gist_id}","starred_url":"https://api.github.com/users/malavasita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malavasita/subscriptions","organizations_url":"https://api.github.com/users/malavasita/orgs","repos_url":"https://api.github.com/users/malavasita/repos","events_url":"https://api.github.com/users/malavasita/events{/privacy}","received_events_url":"https://api.github.com/users/malavasita/received_events","type":"User","site_admin":false},"repo":{"id":125479716,"node_id":"MDEwOlJlcG9zaXRvcnkxMjU0Nzk3MTY=","name":"rtMedia","full_name":"malavasita/rtMedia","owner":{"login":"malavasita","id":25079043,"node_id":"MDQ6VXNlcjI1MDc5MDQz","avatar_url":"https://avatars1.githubusercontent.com/u/25079043?v=4","gravatar_id":"","url":"https://api.github.com/users/malavasita","html_url":"https://github.com/malavasita","followers_url":"https://api.github.com/users/malavasita/followers","following_url":"https://api.github.com/users/malavasita/following{/other_user}","gists_url":"https://api.github.com/users/malavasita/gists{/gist_id}","starred_url":"https://api.github.com/users/malavasita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malavasita/subscriptions","organizations_url":"https://api.github.com/users/malavasita/orgs","repos_url":"https://api.github.com/users/malavasita/repos","events_url":"https://api.github.com/users/malavasita/events{/privacy}","received_events_url":"https://api.github.com/users/malavasita/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/malavasita/rtMedia","description":"rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress","fork":true,"url":"https://api.github.com/repos/malavasita/rtMedia","forks_url":"https://api.github.com/repos/malavasita/rtMedia/forks","keys_url":"https://api.github.com/repos/malavasita/rtMedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/malavasita/rtMedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/malavasita/rtMedia/teams","hooks_url":"https://api.github.com/repos/malavasita/rtMedia/hooks","issue_events_url":"https://api.github.com/repos/malavasita/rtMedia/issues/events{/number}","events_url":"https://api.github.com/repos/malavasita/rtMedia/events","assignees_url":"https://api.github.com/repos/malavasita/rtMedia/assignees{/user}","branches_url":"https://api.github.com/repos/malavasita/rtMedia/branches{/branch}","tags_url":"https://api.github.com/repos/malavasita/rtMedia/tags","blobs_url":"https://api.github.com/repos/malavasita/rtMedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/malavasita/rtMedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/malavasita/rtMedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/malavasita/rtMedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/malavasita/rtMedia/statuses/{sha}","languages_url":"https://api.github.com/repos/malavasita/rtMedia/languages","stargazers_url":"https://api.github.com/repos/malavasita/rtMedia/stargazers","contributors_url":"https://api.github.com/repos/malavasita/rtMedia/contributors","subscribers_url":"https://api.github.com/repos/malavasita/rtMedia/subscribers","subscription_url":"https://api.github.com/repos/malavasita/rtMedia/subscription","commits_url":"https://api.github.com/repos/malavasita/rtMedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/malavasita/rtMedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/malavasita/rtMedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/malavasita/rtMedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/malavasita/rtMedia/contents/{+path}","compare_url":"https://api.github.com/repos/malavasita/rtMedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/malavasita/rtMedia/merges","archive_url":"https://api.github.com/repos/malavasita/rtMedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/malavasita/rtMedia/downloads","issues_url":"https://api.github.com/repos/malavasita/rtMedia/issues{/number}","pulls_url":"https://api.github.com/repos/malavasita/rtMedia/pulls{/number}","milestones_url":"https://api.github.com/repos/malavasita/rtMedia/milestones{/number}","notifications_url":"https://api.github.com/repos/malavasita/rtMedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/malavasita/rtMedia/labels{/name}","releases_url":"https://api.github.com/repos/malavasita/rtMedia/releases{/id}","deployments_url":"https://api.github.com/repos/malavasita/rtMedia/deployments","created_at":"2018-03-16T07:28:11Z","updated_at":"2018-05-25T10:18:52Z","pushed_at":"2018-06-01T12:57:53Z","git_url":"git://github.com/malavasita/rtMedia.git","ssh_url":"git@github.com:malavasita/rtMedia.git","clone_url":"https://github.com/malavasita/rtMedia.git","svn_url":"https://github.com/malavasita/rtMedia","homepage":"https://rtmedia.io/","size":33527,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"rtMediaWP:develop","ref":"develop","sha":"058857ebb5030334e50407db9bf08bcb385b18e5","user":{"login":"rtMediaWP","id":16647576,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjQ3NTc2","avatar_url":"https://avatars1.githubusercontent.com/u/16647576?v=4","gravatar_id":"","url":"https://api.github.com/users/rtMediaWP","html_url":"https://github.com/rtMediaWP","followers_url":"https://api.github.com/users/rtMediaWP/followers","following_url":"https://api.github.com/users/rtMediaWP/following{/other_user}","gists_url":"https://api.github.com/users/rtMediaWP/gists{/gist_id}","starred_url":"https://api.github.com/users/rtMediaWP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtMediaWP/subscriptions","organizations_url":"https://api.github.com/users/rtMediaWP/orgs","repos_url":"https://api.github.com/users/rtMediaWP/repos","events_url":"https://api.github.com/users/rtMediaWP/events{/privacy}","received_events_url":"https://api.github.com/users/rtMediaWP/received_events","type":"Organization","site_admin":false},"repo":{"id":3785670,"node_id":"MDEwOlJlcG9zaXRvcnkzNzg1Njcw","name":"rtMedia","full_name":"rtMediaWP/rtMedia","owner":{"login":"rtMediaWP","id":16647576,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NjQ3NTc2","avatar_url":"https://avatars1.githubusercontent.com/u/16647576?v=4","gravatar_id":"","url":"https://api.github.com/users/rtMediaWP","html_url":"https://github.com/rtMediaWP","followers_url":"https://api.github.com/users/rtMediaWP/followers","following_url":"https://api.github.com/users/rtMediaWP/following{/other_user}","gists_url":"https://api.github.com/users/rtMediaWP/gists{/gist_id}","starred_url":"https://api.github.com/users/rtMediaWP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtMediaWP/subscriptions","organizations_url":"https://api.github.com/users/rtMediaWP/orgs","repos_url":"https://api.github.com/users/rtMediaWP/repos","events_url":"https://api.github.com/users/rtMediaWP/events{/privacy}","received_events_url":"https://api.github.com/users/rtMediaWP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rtMediaWP/rtMedia","description":"rtMedia (formerly Buddypress Media) adds advanced multimedia functionality to WordPress, BuddyPress and bbPress","fork":false,"url":"https://api.github.com/repos/rtMediaWP/rtMedia","forks_url":"https://api.github.com/repos/rtMediaWP/rtMedia/forks","keys_url":"https://api.github.com/repos/rtMediaWP/rtMedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtMediaWP/rtMedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtMediaWP/rtMedia/teams","hooks_url":"https://api.github.com/repos/rtMediaWP/rtMedia/hooks","issue_events_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/events{/number}","events_url":"https://api.github.com/repos/rtMediaWP/rtMedia/events","assignees_url":"https://api.github.com/repos/rtMediaWP/rtMedia/assignees{/user}","branches_url":"https://api.github.com/repos/rtMediaWP/rtMedia/branches{/branch}","tags_url":"https://api.github.com/repos/rtMediaWP/rtMedia/tags","blobs_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/{sha}","languages_url":"https://api.github.com/repos/rtMediaWP/rtMedia/languages","stargazers_url":"https://api.github.com/repos/rtMediaWP/rtMedia/stargazers","contributors_url":"https://api.github.com/repos/rtMediaWP/rtMedia/contributors","subscribers_url":"https://api.github.com/repos/rtMediaWP/rtMedia/subscribers","subscription_url":"https://api.github.com/repos/rtMediaWP/rtMedia/subscription","commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtMediaWP/rtMedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtMediaWP/rtMedia/contents/{+path}","compare_url":"https://api.github.com/repos/rtMediaWP/rtMedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtMediaWP/rtMedia/merges","archive_url":"https://api.github.com/repos/rtMediaWP/rtMedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtMediaWP/rtMedia/downloads","issues_url":"https://api.github.com/repos/rtMediaWP/rtMedia/issues{/number}","pulls_url":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls{/number}","milestones_url":"https://api.github.com/repos/rtMediaWP/rtMedia/milestones{/number}","notifications_url":"https://api.github.com/repos/rtMediaWP/rtMedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtMediaWP/rtMedia/labels{/name}","releases_url":"https://api.github.com/repos/rtMediaWP/rtMedia/releases{/id}","deployments_url":"https://api.github.com/repos/rtMediaWP/rtMedia/deployments","created_at":"2012-03-21T10:54:03Z","updated_at":"2018-05-24T09:58:40Z","pushed_at":"2018-06-01T12:57:54Z","git_url":"git://github.com/rtMediaWP/rtMedia.git","ssh_url":"git@github.com:rtMediaWP/rtMedia.git","clone_url":"https://github.com/rtMediaWP/rtMedia.git","svn_url":"https://github.com/rtMediaWP/rtMedia","homepage":"https://rtmedia.io/","size":33439,"stargazers_count":78,"watchers_count":78,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":82,"license":null,"forks":99,"open_issues":82,"watchers":78,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110"},"html":{"href":"https://github.com/rtMediaWP/rtMedia/pull/1110"},"issue":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1110"},"comments":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/issues/1110/comments"},"review_comments":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110/comments"},"review_comment":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/pulls/1110/commits"},"statuses":{"href":"https://api.github.com/repos/rtMediaWP/rtMedia/statuses/1a914d377d55fce912858ffef9bc06d640b46a52"}},"author_association":"NONE"}}
{"actor":{"display_login":"SID177"}}