{"action":"created","comment":{"url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/comments/27773615","id":27773615,"diff_hunk":"@@ -1,11 +1,76 @@\n <h1>Create new Email</h1>\n \n <%= form_tag send_mass_email_path do %>\n-  <%= label_tag(:subject, 'Subject') %>\n-  <%= text_field_tag :subject  %>\n+\t<%= check_box_tag :urgent %>\n+\t<%= label_tag :urgent, \"Use urgent email prefill\", :id => 'urgent-checkbox' %>\n+\t<%= check_box_tag :new_pay_period %>\n+\t<%= label_tag :new_pay_period, \"Use new pay period email prefill\", :id => 'new-pay-period-checkbox' %>\n+\t<%= check_box_tag :custom %>\n+\t<%= label_tag :custom, \"Write custom email\", :id => 'custom-checkbox' %>\n+\t\n+\t<br>\n+\n+  <%= label_tag(:subject, \"Subject\") %>\n+  <br>\n+  <%= text_field_tag :subject, \"Subject\", :id => 'email-subject', :size =>'70x10'  %>\n   <br>\n-  <%= label_tag(:body, 'Email Body') %>\n-  <%= text_area_tag :body %>\n+  <%= label_tag(:body, \"Email Body\") %>\n+  <br>\n+  <%= text_area_tag :body, \"Email Body\", :id => 'email-body', :size => '70x20' %>\n   <br>\t\n-  <%= submit_tag 'Send Email' %>\n-<% end %>\n\\ No newline at end of file\n+  <%= submit_tag \"Send Email\" %>\n+<% end %>\n+\n+<div id=\"new-pay-period-text\" style=\"display:none\">\n+\t<p>*|first_name|*: a new pay period schedule is available!</p>\n+\t<pre>\n+Hey *|first_name|*,\n+\n+A new pay period schedule is available. Feel free to sign up now at here.\n+\n+As a reminder, because this is a newly added pay period you will only be able to request certain shifts. Requesting a shift does not guarantee that you will be able to work that shift; it is only after the Calendar Administrator has approved your request for a given shift that you will be responsible for that shift. If you request is approved you will receive an email alert.\n+\n+Happy scheduling!\n+The Moonlighter Team\n+\t</pre>\n+</div>\n+<div id=\"urgent-text\" style=\"display:none\">\n+\t<p>Urgent: Shifts still need to be filled for Pay Period *|pay_period_range|*</p>\n+\t<pre>\n+Hey *|first_name|*,\n+\n+There are still unfulfilled shifts for the *|pay_period_range|* pay perdiod. Feel free to sign up now at here\n+\t\t\n+As a reminder, these shifts do not need to be approved by the Calendar Admin. You may sign yourself up from any shift you would like.\n+\n+Happy scheduling!\n+The Moonlighter Team\n+\t</pre>\n+</div>\n+\n+<script>\n+\tvar $email_body = $(\"#email-body\"),\n+\t\t\t$email_subject = $(\"#email-subject\");\n+\n+\t$(\"#urgent-checkbox\").on('click', function() {\n+\t\t\t$email_body.val($('#urgent-text > pre').text())\n+\t\t\t$email_subject.val($('#urgent-text > p').text())\n+\t\t\t$(\":checkbox\").prop('checked', false);\n+\t\t\t$email_body.attr(\"disabled\",true)\n+\t});\n+\n+\t$(\"#new-pay-period-checkbox\").on('click', function() {\n+\t\t\t$email_body.val($('#new-pay-period-text > pre').text())\n+\t\t\t$email_subject.val($('#new-pay-period-text > p').text())\n+\t\t\t$(\":checkbox\").prop('checked', false);\n+\t\t\t$email_body.attr(\"disabled\",true)\n+\t});\n+\n+\t$(\"#custom-checkbox\").on('click', function() {\n+\t\t\t$email_body.val(\"\")\n+\t\t\t$email_subject.val(\"\")\n+\t\t\t$(\":checkbox\").prop('checked', false);\n+\t\t\t$email_body.attr(\"disabled\",false)\n+\t});\n+","path":"app/views/admins/create_new_email.html.erb","position":82,"original_position":82,"commit_id":"66fc8577ae19156340992d9825bf11fcfbed03f5","original_commit_id":"66fc8577ae19156340992d9825bf11fcfbed03f5","user":{"login":"alextriana","id":1951719,"avatar_url":"https://avatars.githubusercontent.com/u/1951719?v=3","gravatar_id":"","url":"https://api.github.com/users/alextriana","html_url":"https://github.com/alextriana","followers_url":"https://api.github.com/users/alextriana/followers","following_url":"https://api.github.com/users/alextriana/following{/other_user}","gists_url":"https://api.github.com/users/alextriana/gists{/gist_id}","starred_url":"https://api.github.com/users/alextriana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextriana/subscriptions","organizations_url":"https://api.github.com/users/alextriana/orgs","repos_url":"https://api.github.com/users/alextriana/repos","events_url":"https://api.github.com/users/alextriana/events{/privacy}","received_events_url":"https://api.github.com/users/alextriana/received_events","type":"User","site_admin":false},"body":"we are, this is to hide and show the different prefills. so like you click a checkbox, the template comes up, and then the text field becomes uneditable. its just to clearly show the user what is in the template, \r\n","created_at":"2015-04-05T00:52:24Z","updated_at":"2015-04-05T00:52:24Z","html_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51#discussion_r27773615","pull_request_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/comments/27773615"},"html":{"href":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51#discussion_r27773615"},"pull_request":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51","id":32641396,"html_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51","diff_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51.diff","patch_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51.patch","issue_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/51","number":51,"state":"open","locked":false,"title":"added email filters, mandrill api","user":{"login":"alextriana","id":1951719,"avatar_url":"https://avatars.githubusercontent.com/u/1951719?v=3","gravatar_id":"","url":"https://api.github.com/users/alextriana","html_url":"https://github.com/alextriana","followers_url":"https://api.github.com/users/alextriana/followers","following_url":"https://api.github.com/users/alextriana/following{/other_user}","gists_url":"https://api.github.com/users/alextriana/gists{/gist_id}","starred_url":"https://api.github.com/users/alextriana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alextriana/subscriptions","organizations_url":"https://api.github.com/users/alextriana/orgs","repos_url":"https://api.github.com/users/alextriana/repos","events_url":"https://api.github.com/users/alextriana/events{/privacy}","received_events_url":"https://api.github.com/users/alextriana/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-04T23:35:58Z","updated_at":"2015-04-05T00:52:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51/commits","review_comments_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51/comments","review_comment_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/51/comments","statuses_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/statuses/66fc8577ae19156340992d9825bf11fcfbed03f5","head":{"label":"stevenbuccini:email_prefills","ref":"email_prefills","sha":"66fc8577ae19156340992d9825bf11fcfbed03f5","user":{"login":"stevenbuccini","id":2475615,"avatar_url":"https://avatars.githubusercontent.com/u/2475615?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbuccini","html_url":"https://github.com/stevenbuccini","followers_url":"https://api.github.com/users/stevenbuccini/followers","following_url":"https://api.github.com/users/stevenbuccini/following{/other_user}","gists_url":"https://api.github.com/users/stevenbuccini/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbuccini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbuccini/subscriptions","organizations_url":"https://api.github.com/users/stevenbuccini/orgs","repos_url":"https://api.github.com/users/stevenbuccini/repos","events_url":"https://api.github.com/users/stevenbuccini/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbuccini/received_events","type":"User","site_admin":false},"repo":{"id":31085326,"name":"er-moonlighter-scheduler","full_name":"stevenbuccini/er-moonlighter-scheduler","owner":{"login":"stevenbuccini","id":2475615,"avatar_url":"https://avatars.githubusercontent.com/u/2475615?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbuccini","html_url":"https://github.com/stevenbuccini","followers_url":"https://api.github.com/users/stevenbuccini/followers","following_url":"https://api.github.com/users/stevenbuccini/following{/other_user}","gists_url":"https://api.github.com/users/stevenbuccini/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbuccini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbuccini/subscriptions","organizations_url":"https://api.github.com/users/stevenbuccini/orgs","repos_url":"https://api.github.com/users/stevenbuccini/repos","events_url":"https://api.github.com/users/stevenbuccini/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbuccini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler","description":"Semester project for 169","fork":false,"url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler","forks_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/forks","keys_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/teams","hooks_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/hooks","issue_events_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/events{/number}","events_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/events","assignees_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/assignees{/user}","branches_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/branches{/branch}","tags_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/tags","blobs_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/languages","stargazers_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/stargazers","contributors_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/contributors","subscribers_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/subscribers","subscription_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/subscription","commits_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/contents/{+path}","compare_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/merges","archive_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/downloads","issues_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues{/number}","pulls_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/labels{/name}","releases_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/releases{/id}","created_at":"2015-02-20T21:08:51Z","updated_at":"2015-04-04T22:56:28Z","pushed_at":"2015-04-05T00:24:07Z","git_url":"git://github.com/stevenbuccini/er-moonlighter-scheduler.git","ssh_url":"git@github.com:stevenbuccini/er-moonlighter-scheduler.git","clone_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler.git","svn_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler","homepage":null,"size":2216,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"stevenbuccini:master","ref":"master","sha":"341c11b5357a95167e488fccdf807c7d66eb70d6","user":{"login":"stevenbuccini","id":2475615,"avatar_url":"https://avatars.githubusercontent.com/u/2475615?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbuccini","html_url":"https://github.com/stevenbuccini","followers_url":"https://api.github.com/users/stevenbuccini/followers","following_url":"https://api.github.com/users/stevenbuccini/following{/other_user}","gists_url":"https://api.github.com/users/stevenbuccini/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbuccini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbuccini/subscriptions","organizations_url":"https://api.github.com/users/stevenbuccini/orgs","repos_url":"https://api.github.com/users/stevenbuccini/repos","events_url":"https://api.github.com/users/stevenbuccini/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbuccini/received_events","type":"User","site_admin":false},"repo":{"id":31085326,"name":"er-moonlighter-scheduler","full_name":"stevenbuccini/er-moonlighter-scheduler","owner":{"login":"stevenbuccini","id":2475615,"avatar_url":"https://avatars.githubusercontent.com/u/2475615?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenbuccini","html_url":"https://github.com/stevenbuccini","followers_url":"https://api.github.com/users/stevenbuccini/followers","following_url":"https://api.github.com/users/stevenbuccini/following{/other_user}","gists_url":"https://api.github.com/users/stevenbuccini/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenbuccini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenbuccini/subscriptions","organizations_url":"https://api.github.com/users/stevenbuccini/orgs","repos_url":"https://api.github.com/users/stevenbuccini/repos","events_url":"https://api.github.com/users/stevenbuccini/events{/privacy}","received_events_url":"https://api.github.com/users/stevenbuccini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler","description":"Semester project for 169","fork":false,"url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler","forks_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/forks","keys_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/teams","hooks_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/hooks","issue_events_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/events{/number}","events_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/events","assignees_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/assignees{/user}","branches_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/branches{/branch}","tags_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/tags","blobs_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/languages","stargazers_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/stargazers","contributors_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/contributors","subscribers_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/subscribers","subscription_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/subscription","commits_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/contents/{+path}","compare_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/merges","archive_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/downloads","issues_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues{/number}","pulls_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/labels{/name}","releases_url":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/releases{/id}","created_at":"2015-02-20T21:08:51Z","updated_at":"2015-04-04T22:56:28Z","pushed_at":"2015-04-05T00:24:07Z","git_url":"git://github.com/stevenbuccini/er-moonlighter-scheduler.git","ssh_url":"git@github.com:stevenbuccini/er-moonlighter-scheduler.git","clone_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler.git","svn_url":"https://github.com/stevenbuccini/er-moonlighter-scheduler","homepage":null,"size":2216,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51"},"html":{"href":"https://github.com/stevenbuccini/er-moonlighter-scheduler/pull/51"},"issue":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/51"},"comments":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/stevenbuccini/er-moonlighter-scheduler/statuses/66fc8577ae19156340992d9825bf11fcfbed03f5"}}}}