GitHub PullRequestReviewCommentEvent at 2014-11-02 12:12:18
Repository: capacity4more
Actor: amitaibu
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/comments/19711717","id":19711717,"diff_hunk":"@@ -24,3 +24,94 @@ function c4m_og_get_group_type_name($node = NULL) {\n   }\n   return strtolower(node_type_get_name($node));\n }\n+\n+/**\n+ * Implements hook_FORM_ID_form_alter().\n+ */\n+function c4m_og_form_group_node_form_alter(&$form, &$form_state) {\n+  // Add javascript behaviors.\n+  drupal_add_js(drupal_get_path('module', 'c4m_og') . '/js/c4m_og.js');\n+\n+  // Get default domain lists.\n+  $ec_domains = variable_get('c4m_og_ec_domains', array(\n+    'ec.europa.eu',\n+    'echofield.eu',\n+    'eeas.europa.eu',\n+    'ext.eeas.europa.eu',\n+    'ext.jrc.ec.europa.eu',\n+    'jrc.ec.europa.eu',\n+  ));\n+\n+  $eu_domains = variable_get('c4m_og_eu_domains', array(\n+    'ada.gv.at',\n+    'adetef.finances.gouv.fr',\n+    'aecid.es',\n+    'afd.fr',\n+  ));\n+  drupal_add_js(array('c4m_og' => array(\n+    'ec_domains' => $ec_domains,\n+    'eu_domains' => $eu_domains,\n+  )), 'setting');\n+\n+  $options = array(\n+    'public' => t('Public'),\n+    'restricted' => t('Restricted'),\n+    'private' => t('Private'),\n+  );\n+\n+  $form['group_access'] = array(\n+    '#type' => 'radios',\n+    '#title' => t('Group access'),\n+    '#required' => TRUE,\n+    '#options' => $options,\n+  );\n+  $form['group_access']['public'] = array(\n+    '#type' => 'radio',\n+    '#title' => t('Public'),\n+    '#weight' => 10,\n+    '#description' => t('All users may view public content from this Group. Users must request to join this Group.'),\n+  );\n+  $form['group_access']['restricted'] = array(\n+    '#type' => 'radio',\n+    '#title' => t('Restricted'),\n+    '#weight' => 20,\n+    '#description' => t('Define by organisation and/or email domain what users can view this Group. Only members can post content to the Group.'),\n+  );\n+  $form['group_access']['restricted_organisations'] = array(\n+    '#weight' => 25,\n+    '#title' => t('Allow users to access this Group by their organisation'),\n+    '#description' => t('Users belonging to these organisations will have access to this Group. Users must request to join this Group.'),\n+    '#type' => 'checkboxes',\n+    '#options' => array(\n+      'ec' => t('EC/EEAS') . '<div>' . t('Accessible to users with email domains: @domains', array('@domains' => implode(', ', $ec_domains))) . '</div>',\n+      'eu' => t('EU') . '<div>' . t('Accessible to users with email domains: @domains', array('@domains' => implode(', ', $eu_domains))) . '</div>',\n+    ),\n+    '#states' => array(\n+      // Show the checkboxes only when \"restricted\" is selected\n+      'visible' => array(\n+        ':input[name=\"group_access\"]' => array('value' => 'restricted'),\n+      ),\n+    ),\n+  );\n+  $form['group_access']['restricted_by_domain'] = array(\n+    '#weight' => 26,","path":"capacity4more/modules/c4m/og/c4m_og/c4m_og.module","position":74,"original_position":74,"commit_id":"02729c848777ae77275e7489a5702c96b633e4c6","original_commit_id":"02729c848777ae77275e7489a5702c96b633e4c6","user":{"login":"amitaibu","id":125707,"avatar_url":"https://avatars.githubusercontent.com/u/125707?v=2","gravatar_id":"","url":"https://api.github.com/users/amitaibu","html_url":"https://github.com/amitaibu","followers_url":"https://api.github.com/users/amitaibu/followers","following_url":"https://api.github.com/users/amitaibu/following{/other_user}","gists_url":"https://api.github.com/users/amitaibu/gists{/gist_id}","starred_url":"https://api.github.com/users/amitaibu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitaibu/subscriptions","organizations_url":"https://api.github.com/users/amitaibu/orgs","repos_url":"https://api.github.com/users/amitaibu/repos","events_url":"https://api.github.com/users/amitaibu/events{/privacy}","received_events_url":"https://api.github.com/users/amitaibu/received_events","type":"User","site_admin":false},"body":"do we need the weight(s)?","created_at":"2014-11-02T12:12:18Z","updated_at":"2014-11-02T12:12:18Z","html_url":"https://github.com/capacity4dev/capacity4more/pull/157#discussion_r19711717","pull_request_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157","_links":{"self":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/comments/19711717"},"html":{"href":"https://github.com/capacity4dev/capacity4more/pull/157#discussion_r19711717"},"pull_request":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157","id":23597484,"html_url":"https://github.com/capacity4dev/capacity4more/pull/157","diff_url":"https://github.com/capacity4dev/capacity4more/pull/157.diff","patch_url":"https://github.com/capacity4dev/capacity4more/pull/157.patch","issue_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/157","number":157,"state":"open","locked":false,"title":"Changing group permission","user":{"login":"shushu","id":99186,"avatar_url":"https://avatars.githubusercontent.com/u/99186?v=2","gravatar_id":"","url":"https://api.github.com/users/shushu","html_url":"https://github.com/shushu","followers_url":"https://api.github.com/users/shushu/followers","following_url":"https://api.github.com/users/shushu/following{/other_user}","gists_url":"https://api.github.com/users/shushu/gists{/gist_id}","starred_url":"https://api.github.com/users/shushu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shushu/subscriptions","organizations_url":"https://api.github.com/users/shushu/orgs","repos_url":"https://api.github.com/users/shushu/repos","events_url":"https://api.github.com/users/shushu/events{/privacy}","received_events_url":"https://api.github.com/users/shushu/received_events","type":"User","site_admin":false},"body":"#156 \r\nWIP\r\n![selection_382](https://cloud.githubusercontent.com/assets/99186/4842556/cf25e086-6026-11e4-8afd-607ed72781f7.png)\r\n","created_at":"2014-10-30T11:20:56Z","updated_at":"2014-11-02T12:12:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b90d8101d2f1795309d1884fe46c9b7ce5bdd7d3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157/commits","review_comments_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157/comments","review_comment_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/comments/{number}","comments_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/157/comments","statuses_url":"https://api.github.com/repos/capacity4dev/capacity4more/statuses/02729c848777ae77275e7489a5702c96b633e4c6","head":{"label":"capacity4dev:features/CFD-156-group-add-form-changes","ref":"features/CFD-156-group-add-form-changes","sha":"02729c848777ae77275e7489a5702c96b633e4c6","user":{"login":"capacity4dev","id":6919578,"avatar_url":"https://avatars.githubusercontent.com/u/6919578?v=2","gravatar_id":"","url":"https://api.github.com/users/capacity4dev","html_url":"https://github.com/capacity4dev","followers_url":"https://api.github.com/users/capacity4dev/followers","following_url":"https://api.github.com/users/capacity4dev/following{/other_user}","gists_url":"https://api.github.com/users/capacity4dev/gists{/gist_id}","starred_url":"https://api.github.com/users/capacity4dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capacity4dev/subscriptions","organizations_url":"https://api.github.com/users/capacity4dev/orgs","repos_url":"https://api.github.com/users/capacity4dev/repos","events_url":"https://api.github.com/users/capacity4dev/events{/privacy}","received_events_url":"https://api.github.com/users/capacity4dev/received_events","type":"Organization","site_admin":false},"repo":{"id":18283391,"name":"capacity4more","full_name":"capacity4dev/capacity4more","owner":{"login":"capacity4dev","id":6919578,"avatar_url":"https://avatars.githubusercontent.com/u/6919578?v=2","gravatar_id":"","url":"https://api.github.com/users/capacity4dev","html_url":"https://github.com/capacity4dev","followers_url":"https://api.github.com/users/capacity4dev/followers","following_url":"https://api.github.com/users/capacity4dev/following{/other_user}","gists_url":"https://api.github.com/users/capacity4dev/gists{/gist_id}","starred_url":"https://api.github.com/users/capacity4dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capacity4dev/subscriptions","organizations_url":"https://api.github.com/users/capacity4dev/orgs","repos_url":"https://api.github.com/users/capacity4dev/repos","events_url":"https://api.github.com/users/capacity4dev/events{/privacy}","received_events_url":"https://api.github.com/users/capacity4dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/capacity4dev/capacity4more","description":"A Drupal 7 powered distribution providing a community platform to share knowledge.","fork":false,"url":"https://api.github.com/repos/capacity4dev/capacity4more","forks_url":"https://api.github.com/repos/capacity4dev/capacity4more/forks","keys_url":"https://api.github.com/repos/capacity4dev/capacity4more/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capacity4dev/capacity4more/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capacity4dev/capacity4more/teams","hooks_url":"https://api.github.com/repos/capacity4dev/capacity4more/hooks","issue_events_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/events{/number}","events_url":"https://api.github.com/repos/capacity4dev/capacity4more/events","assignees_url":"https://api.github.com/repos/capacity4dev/capacity4more/assignees{/user}","branches_url":"https://api.github.com/repos/capacity4dev/capacity4more/branches{/branch}","tags_url":"https://api.github.com/repos/capacity4dev/capacity4more/tags","blobs_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/refs{/sha}","trees_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capacity4dev/capacity4more/statuses/{sha}","languages_url":"https://api.github.com/repos/capacity4dev/capacity4more/languages","stargazers_url":"https://api.github.com/repos/capacity4dev/capacity4more/stargazers","contributors_url":"https://api.github.com/repos/capacity4dev/capacity4more/contributors","subscribers_url":"https://api.github.com/repos/capacity4dev/capacity4more/subscribers","subscription_url":"https://api.github.com/repos/capacity4dev/capacity4more/subscription","commits_url":"https://api.github.com/repos/capacity4dev/capacity4more/commits{/sha}","git_commits_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/commits{/sha}","comments_url":"https://api.github.com/repos/capacity4dev/capacity4more/comments{/number}","issue_comment_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/comments/{number}","contents_url":"https://api.github.com/repos/capacity4dev/capacity4more/contents/{+path}","compare_url":"https://api.github.com/repos/capacity4dev/capacity4more/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capacity4dev/capacity4more/merges","archive_url":"https://api.github.com/repos/capacity4dev/capacity4more/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capacity4dev/capacity4more/downloads","issues_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues{/number}","pulls_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls{/number}","milestones_url":"https://api.github.com/repos/capacity4dev/capacity4more/milestones{/number}","notifications_url":"https://api.github.com/repos/capacity4dev/capacity4more/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capacity4dev/capacity4more/labels{/name}","releases_url":"https://api.github.com/repos/capacity4dev/capacity4more/releases{/id}","created_at":"2014-03-31T06:03:43Z","updated_at":"2014-09-11T11:41:43Z","pushed_at":"2014-11-02T12:07:19Z","git_url":"git://github.com/capacity4dev/capacity4more.git","ssh_url":"git@github.com:capacity4dev/capacity4more.git","clone_url":"https://github.com/capacity4dev/capacity4more.git","svn_url":"https://github.com/capacity4dev/capacity4more","homepage":null,"size":16764,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":49,"forks":0,"open_issues":49,"watchers":1,"default_branch":"develop"}},"base":{"label":"capacity4dev:develop","ref":"develop","sha":"d8dcb78c16afc5df9df617da385eabd040167177","user":{"login":"capacity4dev","id":6919578,"avatar_url":"https://avatars.githubusercontent.com/u/6919578?v=2","gravatar_id":"","url":"https://api.github.com/users/capacity4dev","html_url":"https://github.com/capacity4dev","followers_url":"https://api.github.com/users/capacity4dev/followers","following_url":"https://api.github.com/users/capacity4dev/following{/other_user}","gists_url":"https://api.github.com/users/capacity4dev/gists{/gist_id}","starred_url":"https://api.github.com/users/capacity4dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capacity4dev/subscriptions","organizations_url":"https://api.github.com/users/capacity4dev/orgs","repos_url":"https://api.github.com/users/capacity4dev/repos","events_url":"https://api.github.com/users/capacity4dev/events{/privacy}","received_events_url":"https://api.github.com/users/capacity4dev/received_events","type":"Organization","site_admin":false},"repo":{"id":18283391,"name":"capacity4more","full_name":"capacity4dev/capacity4more","owner":{"login":"capacity4dev","id":6919578,"avatar_url":"https://avatars.githubusercontent.com/u/6919578?v=2","gravatar_id":"","url":"https://api.github.com/users/capacity4dev","html_url":"https://github.com/capacity4dev","followers_url":"https://api.github.com/users/capacity4dev/followers","following_url":"https://api.github.com/users/capacity4dev/following{/other_user}","gists_url":"https://api.github.com/users/capacity4dev/gists{/gist_id}","starred_url":"https://api.github.com/users/capacity4dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/capacity4dev/subscriptions","organizations_url":"https://api.github.com/users/capacity4dev/orgs","repos_url":"https://api.github.com/users/capacity4dev/repos","events_url":"https://api.github.com/users/capacity4dev/events{/privacy}","received_events_url":"https://api.github.com/users/capacity4dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/capacity4dev/capacity4more","description":"A Drupal 7 powered distribution providing a community platform to share knowledge.","fork":false,"url":"https://api.github.com/repos/capacity4dev/capacity4more","forks_url":"https://api.github.com/repos/capacity4dev/capacity4more/forks","keys_url":"https://api.github.com/repos/capacity4dev/capacity4more/keys{/key_id}","collaborators_url":"https://api.github.com/repos/capacity4dev/capacity4more/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/capacity4dev/capacity4more/teams","hooks_url":"https://api.github.com/repos/capacity4dev/capacity4more/hooks","issue_events_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/events{/number}","events_url":"https://api.github.com/repos/capacity4dev/capacity4more/events","assignees_url":"https://api.github.com/repos/capacity4dev/capacity4more/assignees{/user}","branches_url":"https://api.github.com/repos/capacity4dev/capacity4more/branches{/branch}","tags_url":"https://api.github.com/repos/capacity4dev/capacity4more/tags","blobs_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/refs{/sha}","trees_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/trees{/sha}","statuses_url":"https://api.github.com/repos/capacity4dev/capacity4more/statuses/{sha}","languages_url":"https://api.github.com/repos/capacity4dev/capacity4more/languages","stargazers_url":"https://api.github.com/repos/capacity4dev/capacity4more/stargazers","contributors_url":"https://api.github.com/repos/capacity4dev/capacity4more/contributors","subscribers_url":"https://api.github.com/repos/capacity4dev/capacity4more/subscribers","subscription_url":"https://api.github.com/repos/capacity4dev/capacity4more/subscription","commits_url":"https://api.github.com/repos/capacity4dev/capacity4more/commits{/sha}","git_commits_url":"https://api.github.com/repos/capacity4dev/capacity4more/git/commits{/sha}","comments_url":"https://api.github.com/repos/capacity4dev/capacity4more/comments{/number}","issue_comment_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues/comments/{number}","contents_url":"https://api.github.com/repos/capacity4dev/capacity4more/contents/{+path}","compare_url":"https://api.github.com/repos/capacity4dev/capacity4more/compare/{base}...{head}","merges_url":"https://api.github.com/repos/capacity4dev/capacity4more/merges","archive_url":"https://api.github.com/repos/capacity4dev/capacity4more/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/capacity4dev/capacity4more/downloads","issues_url":"https://api.github.com/repos/capacity4dev/capacity4more/issues{/number}","pulls_url":"https://api.github.com/repos/capacity4dev/capacity4more/pulls{/number}","milestones_url":"https://api.github.com/repos/capacity4dev/capacity4more/milestones{/number}","notifications_url":"https://api.github.com/repos/capacity4dev/capacity4more/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/capacity4dev/capacity4more/labels{/name}","releases_url":"https://api.github.com/repos/capacity4dev/capacity4more/releases{/id}","created_at":"2014-03-31T06:03:43Z","updated_at":"2014-09-11T11:41:43Z","pushed_at":"2014-11-02T12:07:19Z","git_url":"git://github.com/capacity4dev/capacity4more.git","ssh_url":"git@github.com:capacity4dev/capacity4more.git","clone_url":"https://github.com/capacity4dev/capacity4more.git","svn_url":"https://github.com/capacity4dev/capacity4more","homepage":null,"size":16764,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":49,"forks":0,"open_issues":49,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157"},"html":{"href":"https://github.com/capacity4dev/capacity4more/pull/157"},"issue":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/issues/157"},"comments":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/capacity4dev/capacity4more/statuses/02729c848777ae77275e7489a5702c96b633e4c6"}}}}