{"action":"created","comment":{"url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/comments/202964433","pull_request_review_id":137758414,"id":202964433,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjk2NDQzMw==","diff_hunk":"@@ -0,0 +1,71 @@\n+{% from 'cern_access:_common.html' import render_access_dates %}\n+{% from 'forms/_form.html' import form_header, form_rows, form_footer %}\n+{% from 'message_box.html' import message_box %}\n+{% from '_switch.html' import switch %}\n+\n+{% set access_request = registration.cern_access_request %}\n+\n+{% if not registration or not access_request or (not access_request.has_identity_info and not access_request.is_active) %}\n+    <div class=\"personal-data-form\">\n+        <div class=\"action-box highlight\" style=\"margin-top: 10px;\">\n+            <div class=\"section\">\n+                <div class=\"icon icon-location\"></div>\n+                <div class=\"text\">\n+                    <div class=\"label\">\n+                        {%- trans %}Request access to the CERN site{% endtrans -%}\n+                    </div>\n+                    <div>\n+                    </div>\n+                </div>\n+                <div class=\"toolbar\">\n+                    {{ switch(id='toggle-personal-data-form', checked=false, name='ext__request_cern_access') }}\n+                </div>\n+            </div>\n+        </div>\n+        <div class=\"i-box regform-section\">\n+            <div class=\"i-box-header\">\n+                <div class=\"i-box-title\">{% trans %}CERN Access{% endtrans %}</div>\n+                <div class=\"i-box-header-text\">\n+                    {% trans dates=render_access_dates(start_dt, end_dt) -%}\n+                        CERN's Security Policy requires you to provide the following\n+                        additional data. The contents of this form will not be shared\n+                        with the event organizers and will only be revealed upon request\n+                        from CERN's Site Surveillance service.\n+                        <br>\n+                        <br>\n+                        Once you have provided this data and the access has been granted, you will be able to download\n+                        a ticket which grants you access to the CERN site during this\n+                        period: {{ dates }}\n+                    {%- endtrans %}\n+                </div>\n+            </div>\n+            <div class=\"i-box-content\">\n+                <div class=\"i-form\">\n+                    {{ form_rows(form, orientation='horizontal', fields=('ext__birth_date', 'ext__nationality', 'ext__birth_place')) }}\n+                </div>\n+            </div>\n+        </div>\n+    </div>\n+\n+    <script>\n+        (function() {\n+            'use strict';\n+\n+            $(document).on('registration-form-loaded', function() {\n+                var registrationForm = $('#registrationForm'),\n+                    personalDataForm = $('.personal-data-form').detach();\n+\n+                registrationForm.find('.regform-section-list').append(personalDataForm);\n+            });\n+\n+            $(document).ready(function() {\n+                var personalDataForm = $('.personal-data-form').find('.i-box');\n+\n+                personalDataForm.hide();\n+                $('#toggle-personal-data-form').on('change', function() {\n+                    personalDataForm.toggle();","path":"cern_access/indico_cern_access/templates/regform_identity_data_section.html","position":66,"original_position":66,"commit_id":"6e03bdae449a234a1047fc07e4421953b671a9fa","original_commit_id":"6e03bdae449a234a1047fc07e4421953b671a9fa","user":{"login":"ThiefMaster","id":179599,"node_id":"MDQ6VXNlcjE3OTU5OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/179599?v=4","gravatar_id":"","url":"https://api.github.com/users/ThiefMaster","html_url":"https://github.com/ThiefMaster","followers_url":"https://api.github.com/users/ThiefMaster/followers","following_url":"https://api.github.com/users/ThiefMaster/following{/other_user}","gists_url":"https://api.github.com/users/ThiefMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiefMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiefMaster/subscriptions","organizations_url":"https://api.github.com/users/ThiefMaster/orgs","repos_url":"https://api.github.com/users/ThiefMaster/repos","events_url":"https://api.github.com/users/ThiefMaster/events{/privacy}","received_events_url":"https://api.github.com/users/ThiefMaster/received_events","type":"User","site_admin":false},"body":"that's just asking for things to get out of sync. it's better to toggle it to the `this.checked` status and then trigger the change event handler afterwards to have the correct state before the first real change on the field.","created_at":"2018-07-17T10:03:57Z","updated_at":"2018-07-17T10:03:58Z","html_url":"https://github.com/indico/indico-plugins-cern/pull/22#discussion_r202964433","pull_request_url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/comments/202964433"},"html":{"href":"https://github.com/indico/indico-plugins-cern/pull/22#discussion_r202964433"},"pull_request":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22","id":201278647,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMjc4NjQ3","html_url":"https://github.com/indico/indico-plugins-cern/pull/22","diff_url":"https://github.com/indico/indico-plugins-cern/pull/22.diff","patch_url":"https://github.com/indico/indico-plugins-cern/pull/22.patch","issue_url":"https://api.github.com/repos/indico/indico-plugins-cern/issues/22","number":22,"state":"open","locked":false,"title":"CERNAccess: Request CERN access from a registration form","user":{"login":"mic4ael","id":3616940,"node_id":"MDQ6VXNlcjM2MTY5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/3616940?v=4","gravatar_id":"","url":"https://api.github.com/users/mic4ael","html_url":"https://github.com/mic4ael","followers_url":"https://api.github.com/users/mic4ael/followers","following_url":"https://api.github.com/users/mic4ael/following{/other_user}","gists_url":"https://api.github.com/users/mic4ael/gists{/gist_id}","starred_url":"https://api.github.com/users/mic4ael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic4ael/subscriptions","organizations_url":"https://api.github.com/users/mic4ael/orgs","repos_url":"https://api.github.com/users/mic4ael/repos","events_url":"https://api.github.com/users/mic4ael/events{/privacy}","received_events_url":"https://api.github.com/users/mic4ael/received_events","type":"User","site_admin":false},"body":"closes #21","created_at":"2018-07-13T12:37:14Z","updated_at":"2018-07-17T10:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee02d998ec51d890cd3c00a198fe2b8a2d24c421","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22/commits","review_comments_url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22/comments","review_comment_url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indico/indico-plugins-cern/issues/22/comments","statuses_url":"https://api.github.com/repos/indico/indico-plugins-cern/statuses/6e03bdae449a234a1047fc07e4421953b671a9fa","head":{"label":"mic4ael:access-plugin-reg-form","ref":"access-plugin-reg-form","sha":"6e03bdae449a234a1047fc07e4421953b671a9fa","user":{"login":"mic4ael","id":3616940,"node_id":"MDQ6VXNlcjM2MTY5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/3616940?v=4","gravatar_id":"","url":"https://api.github.com/users/mic4ael","html_url":"https://github.com/mic4ael","followers_url":"https://api.github.com/users/mic4ael/followers","following_url":"https://api.github.com/users/mic4ael/following{/other_user}","gists_url":"https://api.github.com/users/mic4ael/gists{/gist_id}","starred_url":"https://api.github.com/users/mic4ael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic4ael/subscriptions","organizations_url":"https://api.github.com/users/mic4ael/orgs","repos_url":"https://api.github.com/users/mic4ael/repos","events_url":"https://api.github.com/users/mic4ael/events{/privacy}","received_events_url":"https://api.github.com/users/mic4ael/received_events","type":"User","site_admin":false},"repo":{"id":109974520,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5NzQ1MjA=","name":"indico-plugins-cern","full_name":"mic4ael/indico-plugins-cern","owner":{"login":"mic4ael","id":3616940,"node_id":"MDQ6VXNlcjM2MTY5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/3616940?v=4","gravatar_id":"","url":"https://api.github.com/users/mic4ael","html_url":"https://github.com/mic4ael","followers_url":"https://api.github.com/users/mic4ael/followers","following_url":"https://api.github.com/users/mic4ael/following{/other_user}","gists_url":"https://api.github.com/users/mic4ael/gists{/gist_id}","starred_url":"https://api.github.com/users/mic4ael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic4ael/subscriptions","organizations_url":"https://api.github.com/users/mic4ael/orgs","repos_url":"https://api.github.com/users/mic4ael/repos","events_url":"https://api.github.com/users/mic4ael/events{/privacy}","received_events_url":"https://api.github.com/users/mic4ael/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mic4ael/indico-plugins-cern","description":"CERN-specific Indico plugins","fork":true,"url":"https://api.github.com/repos/mic4ael/indico-plugins-cern","forks_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/forks","keys_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/teams","hooks_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/hooks","issue_events_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/issues/events{/number}","events_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/events","assignees_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/assignees{/user}","branches_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/branches{/branch}","tags_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/tags","blobs_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/git/refs{/sha}","trees_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/statuses/{sha}","languages_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/languages","stargazers_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/stargazers","contributors_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/contributors","subscribers_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/subscribers","subscription_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/subscription","commits_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/commits{/sha}","git_commits_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/git/commits{/sha}","comments_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/comments{/number}","issue_comment_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/issues/comments{/number}","contents_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/contents/{+path}","compare_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/merges","archive_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/downloads","issues_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/issues{/number}","pulls_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/pulls{/number}","milestones_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/milestones{/number}","notifications_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/labels{/name}","releases_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/releases{/id}","deployments_url":"https://api.github.com/repos/mic4ael/indico-plugins-cern/deployments","created_at":"2017-11-08T12:42:27Z","updated_at":"2018-07-12T11:02:04Z","pushed_at":"2018-07-16T11:58:36Z","git_url":"git://github.com/mic4ael/indico-plugins-cern.git","ssh_url":"git@github.com:mic4ael/indico-plugins-cern.git","clone_url":"https://github.com/mic4ael/indico-plugins-cern.git","svn_url":"https://github.com/mic4ael/indico-plugins-cern","homepage":null,"size":1159,"stargazers_count":0,"watchers_count":0,"language":"Python","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":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"indico:2.0-maintenance","ref":"2.0-maintenance","sha":"c20ec0db7a1b72576f98a1f948b77407f9a871b5","user":{"login":"indico","id":715236,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxNTIzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/715236?v=4","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"repo":{"id":109959841,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk5NTk4NDE=","name":"indico-plugins-cern","full_name":"indico/indico-plugins-cern","owner":{"login":"indico","id":715236,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxNTIzNg==","avatar_url":"https://avatars2.githubusercontent.com/u/715236?v=4","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indico/indico-plugins-cern","description":"CERN-specific Indico plugins","fork":false,"url":"https://api.github.com/repos/indico/indico-plugins-cern","forks_url":"https://api.github.com/repos/indico/indico-plugins-cern/forks","keys_url":"https://api.github.com/repos/indico/indico-plugins-cern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indico/indico-plugins-cern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indico/indico-plugins-cern/teams","hooks_url":"https://api.github.com/repos/indico/indico-plugins-cern/hooks","issue_events_url":"https://api.github.com/repos/indico/indico-plugins-cern/issues/events{/number}","events_url":"https://api.github.com/repos/indico/indico-plugins-cern/events","assignees_url":"https://api.github.com/repos/indico/indico-plugins-cern/assignees{/user}","branches_url":"https://api.github.com/repos/indico/indico-plugins-cern/branches{/branch}","tags_url":"https://api.github.com/repos/indico/indico-plugins-cern/tags","blobs_url":"https://api.github.com/repos/indico/indico-plugins-cern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indico/indico-plugins-cern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indico/indico-plugins-cern/git/refs{/sha}","trees_url":"https://api.github.com/repos/indico/indico-plugins-cern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indico/indico-plugins-cern/statuses/{sha}","languages_url":"https://api.github.com/repos/indico/indico-plugins-cern/languages","stargazers_url":"https://api.github.com/repos/indico/indico-plugins-cern/stargazers","contributors_url":"https://api.github.com/repos/indico/indico-plugins-cern/contributors","subscribers_url":"https://api.github.com/repos/indico/indico-plugins-cern/subscribers","subscription_url":"https://api.github.com/repos/indico/indico-plugins-cern/subscription","commits_url":"https://api.github.com/repos/indico/indico-plugins-cern/commits{/sha}","git_commits_url":"https://api.github.com/repos/indico/indico-plugins-cern/git/commits{/sha}","comments_url":"https://api.github.com/repos/indico/indico-plugins-cern/comments{/number}","issue_comment_url":"https://api.github.com/repos/indico/indico-plugins-cern/issues/comments{/number}","contents_url":"https://api.github.com/repos/indico/indico-plugins-cern/contents/{+path}","compare_url":"https://api.github.com/repos/indico/indico-plugins-cern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indico/indico-plugins-cern/merges","archive_url":"https://api.github.com/repos/indico/indico-plugins-cern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indico/indico-plugins-cern/downloads","issues_url":"https://api.github.com/repos/indico/indico-plugins-cern/issues{/number}","pulls_url":"https://api.github.com/repos/indico/indico-plugins-cern/pulls{/number}","milestones_url":"https://api.github.com/repos/indico/indico-plugins-cern/milestones{/number}","notifications_url":"https://api.github.com/repos/indico/indico-plugins-cern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indico/indico-plugins-cern/labels{/name}","releases_url":"https://api.github.com/repos/indico/indico-plugins-cern/releases{/id}","deployments_url":"https://api.github.com/repos/indico/indico-plugins-cern/deployments","created_at":"2017-11-08T10:12:34Z","updated_at":"2018-06-21T08:23:22Z","pushed_at":"2018-07-16T11:58:37Z","git_url":"git://github.com/indico/indico-plugins-cern.git","ssh_url":"git@github.com:indico/indico-plugins-cern.git","clone_url":"https://github.com/indico/indico-plugins-cern.git","svn_url":"https://github.com/indico/indico-plugins-cern","homepage":null,"size":1158,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22"},"html":{"href":"https://github.com/indico/indico-plugins-cern/pull/22"},"issue":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/issues/22"},"comments":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/indico/indico-plugins-cern/statuses/6e03bdae449a234a1047fc07e4421953b671a9fa"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ThiefMaster"}}