{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/26766728","id":26766728,"diff_hunk":"@@ -189,13 +183,12 @@ function dosomething_signup_sms_game_form($form, &$form_state, $node, $num_frien\n     ),\n   );\n   for ($i = 0; $i < $num_friends; $i++) {\n-    // Default to second fieldset.\n-    $group = 'group2';\n-    if ($i == 0) {\n-      // Unless its the first beta.\n-      $group = 'group1';\n-    }\n-    $form[$group]['beta_mobile_' .$i] = array(\n+    $form['group1']['beta_first_name_' .$i] = array(\n+      '#type' => 'hidden',\n+      '#title' => 'Your Friend\\'s Name',","path":"lib/modules/dosomething/dosomething_signup/dosomething_signup.forms.inc","position":28,"original_position":28,"commit_id":"d0fb7a6cc86d5cf96510b8908d6eef027698e28c","original_commit_id":"d0fb7a6cc86d5cf96510b8908d6eef027698e28c","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"`t()` ?","created_at":"2015-03-19T15:47:34Z","updated_at":"2015-03-19T15:47:34Z","html_url":"https://github.com/DoSomething/dosomething/pull/4247#discussion_r26766728","pull_request_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/26766728"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/4247#discussion_r26766728"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247","id":31534657,"html_url":"https://github.com/DoSomething/dosomething/pull/4247","diff_url":"https://github.com/DoSomething/dosomething/pull/4247.diff","patch_url":"https://github.com/DoSomething/dosomething/pull/4247.patch","issue_url":"https://api.github.com/repos/DoSomething/dosomething/issues/4247","number":4247,"state":"open","locked":false,"title":"Add markup/styles for SMS first names Optimizely test.","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"body":"# Changes\r\n - Adds markup and styles for SMS first names Optimizely test. Closes #3568.\r\n - Add hidden fields & whitelist them to be passed to Mobile Commons. We only validate them client-side, so Drupal doesn't need to know whether or not A/B test is functioning on page.\r\n - Removes CSS column groups, instead floating individual fields as half-width blocks. This allows us to have adjacent fields side-by-side rather than stacked vertically (needed for friend name & number fields to be side-by-side in the A/B variant).\r\n\r\nFor review: @aaronschachter @DoSomething/front-end @jonuy \r\n\r\n# Snippet\r\n```js\r\nvar $ = jQuery;\r\nvar $form = $(\"#dosomething-signup-sms-game-form\");\r\n$form.addClass('optimizely-sms-form');\r\n$form.find(\".form-item-alpha-first-name\").remove();\r\n$form.find(\"#edit-group1\").html($(\"#ab-test-sms-names\").html()); \r\n```\r\n\r\n(You can test this by copying and pasting into the web console on staging or your dev environment!)\r\n\r\n# Screenshots\r\n#### Before:\r\n![screen shot 2015-03-19 at 11 24 48 am](https://cloud.githubusercontent.com/assets/583202/6733859/28eea95a-ce2b-11e4-9cd3-4d3e862e4c57.png)\r\n\r\n\r\n#### After (with A/B test activated):\r\n![screen shot 2015-03-19 at 11 25 42 am](https://cloud.githubusercontent.com/assets/583202/6733864/2cd4e2fa-ce2b-11e4-90eb-788b99e9504b.png)\r\n\r\n\r\n# Updated Example Payload\r\nMobile Commons will receive the exact same payload, but includes an extra `friend_names` array, which is either empty (when A/B test is not activated) or contains three ordered names corresponding to the numbers in `friends` parameter. For example:\r\n```\r\narray(3) { [\"args\"]=> array(7) { [\"opt_in_path[]\"]=> string(6) \"176153\" [\"person[phone]\"]=> string(10) \"2035555666\" [\"person[email]\"]=> string(23) \"dfurnes@dosomething.org\" [\"person[first_name]\"]=> string(4) \"Test\" [\"person[date_of_birth]\"]=> string(10) \"2014-02-03\" [\"person[campaign_name]\"]=> string(12) \"SMS Campaign\" [\"friends_opt_in_path\"]=> string(6) \"176155\" } [\"friends\"]=> array(3) { [0]=> string(10) \"2025553838\" [1]=> string(10) \"2225556666\" [2]=> string(10) \"2920001212\" } [\"friend_names\"]=> array(3) { [0]=> string(3) \"Joe\" [1]=> string(3) \"Bob\" [2]=> string(4) \"Jill\" } }\r\n```","created_at":"2015-03-19T15:32:32Z","updated_at":"2015-03-19T15:47:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed286d621170b65aa405bab59c84127edb3b5b4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247/commits","review_comments_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247/comments","review_comment_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/issues/4247/comments","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/d0fb7a6cc86d5cf96510b8908d6eef027698e28c","head":{"label":"DFurnes:sms-optimizely","ref":"sms-optimizely","sha":"d0fb7a6cc86d5cf96510b8908d6eef027698e28c","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"repo":{"id":23975099,"name":"dosomething","full_name":"DFurnes/dosomething","owner":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars.githubusercontent.com/u/583202?v=3","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DFurnes/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/DFurnes/dosomething","forks_url":"https://api.github.com/repos/DFurnes/dosomething/forks","keys_url":"https://api.github.com/repos/DFurnes/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DFurnes/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DFurnes/dosomething/teams","hooks_url":"https://api.github.com/repos/DFurnes/dosomething/hooks","issue_events_url":"https://api.github.com/repos/DFurnes/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/DFurnes/dosomething/events","assignees_url":"https://api.github.com/repos/DFurnes/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/DFurnes/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/DFurnes/dosomething/tags","blobs_url":"https://api.github.com/repos/DFurnes/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DFurnes/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DFurnes/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/DFurnes/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DFurnes/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/DFurnes/dosomething/languages","stargazers_url":"https://api.github.com/repos/DFurnes/dosomething/stargazers","contributors_url":"https://api.github.com/repos/DFurnes/dosomething/contributors","subscribers_url":"https://api.github.com/repos/DFurnes/dosomething/subscribers","subscription_url":"https://api.github.com/repos/DFurnes/dosomething/subscription","commits_url":"https://api.github.com/repos/DFurnes/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/DFurnes/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/DFurnes/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/DFurnes/dosomething/issues/comments{/number}","contents_url":"https://api.github.com/repos/DFurnes/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/DFurnes/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DFurnes/dosomething/merges","archive_url":"https://api.github.com/repos/DFurnes/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DFurnes/dosomething/downloads","issues_url":"https://api.github.com/repos/DFurnes/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/DFurnes/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/DFurnes/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/DFurnes/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DFurnes/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/DFurnes/dosomething/releases{/id}","created_at":"2014-09-12T20:07:06Z","updated_at":"2015-03-19T15:37:15Z","pushed_at":"2015-03-19T15:37:13Z","git_url":"git://github.com/DFurnes/dosomething.git","ssh_url":"git@github.com:DFurnes/dosomething.git","clone_url":"https://github.com/DFurnes/dosomething.git","svn_url":"https://github.com/DFurnes/dosomething","homepage":"http://www.dosomething.org/","size":13501,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"b40a324dcd39654a02dfba4d2e2c2057a193cd31","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"dosomething","full_name":"DoSomething/dosomething","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/dosomething","forks_url":"https://api.github.com/repos/DoSomething/dosomething/forks","keys_url":"https://api.github.com/repos/DoSomething/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/dosomething/teams","hooks_url":"https://api.github.com/repos/DoSomething/dosomething/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/dosomething/events","assignees_url":"https://api.github.com/repos/DoSomething/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/dosomething/tags","blobs_url":"https://api.github.com/repos/DoSomething/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/dosomething/languages","stargazers_url":"https://api.github.com/repos/DoSomething/dosomething/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/dosomething/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/dosomething/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/dosomething/subscription","commits_url":"https://api.github.com/repos/DoSomething/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/dosomething/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/dosomething/merges","archive_url":"https://api.github.com/repos/DoSomething/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/dosomething/downloads","issues_url":"https://api.github.com/repos/DoSomething/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/dosomething/releases{/id}","created_at":"2013-10-15T14:50:48Z","updated_at":"2015-03-19T15:28:42Z","pushed_at":"2015-03-19T15:30:45Z","git_url":"git://github.com/DoSomething/dosomething.git","ssh_url":"git@github.com:DoSomething/dosomething.git","clone_url":"https://github.com/DoSomething/dosomething.git","svn_url":"https://github.com/DoSomething/dosomething","homepage":"http://www.dosomething.org/","size":25710,"stargazers_count":21,"watchers_count":21,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":181,"forks":15,"open_issues":181,"watchers":21,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/4247"},"issue":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/4247"},"comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/4247/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/4247/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/dosomething/statuses/d0fb7a6cc86d5cf96510b8908d6eef027698e28c"}}}}