{"action":"created","comment":{"url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/comments/40749195","id":40749195,"diff_hunk":"@@ -0,0 +1,42 @@\n+{% import 'macros/form.html' as form %}\n+{% set date = '' %}\n+{% set time = '' %}\n+{% set dateTime = data.get(field.field_name, '') %}\n+\n+{% if dateTime is string %}\n+    {% set parts = dateTime.split() %}\n+    {% set date = parts[0] %}\n+    {% set time = parts[1] %}\n+{% elif dateTime is sequence %}\n+    {% set date = dateTime[0] %}\n+    {% set time = dateTime[1] %}\n+{% endif %}\n+{% call form.input(\n+    field.field_name,\n+    id='field-' + field.field_name +  '-date',\n+    label= h.scheming_language_text(field.label),\n+    type='date',\n+    value=date,\n+    error=errors[field.field_name],\n+    classes=['control-medium'],\n+    attrs=field.form_attrs if 'form_attrs' in field else {},\n+    is_required=h.scheming_field_required(field)\n+    )\n+%}\n+    {%- snippet 'scheming/form_snippets/help_text.html', field=field -%}\n+{% endcall %}\n+\n+{% call form.input(\n+    field.field_name,\n+    id='field-' + field.field_name + '-time',\n+    label= h.scheming_language_text(field.get('label_time', 'Time')),\n+    type='time',\n+    value=time,\n+    error=errors[field.field_name],","path":"ckanext/scheming/templates/scheming/form_snippets/datetime.html","position":35,"original_position":35,"commit_id":"0bffddc68873ef97321aa3477c6be0554bd9a321","original_commit_id":"0bffddc68873ef97321aa3477c6be0554bd9a321","user":{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false},"body":"The errors should appear on one field or the other, not both. This will show the same error twice if there is an error on the field.","created_at":"2015-09-30T00:55:15Z","updated_at":"2015-09-30T00:55:15Z","html_url":"https://github.com/open-data/ckanext-scheming/pull/88#discussion_r40749195","pull_request_url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/comments/40749195"},"html":{"href":"https://github.com/open-data/ckanext-scheming/pull/88#discussion_r40749195"},"pull_request":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88","id":46309227,"html_url":"https://github.com/open-data/ckanext-scheming/pull/88","diff_url":"https://github.com/open-data/ckanext-scheming/pull/88.diff","patch_url":"https://github.com/open-data/ckanext-scheming/pull/88.patch","issue_url":"https://api.github.com/repos/open-data/ckanext-scheming/issues/88","number":88,"state":"open","locked":false,"title":"Added a datetime preset for using HTML5 date and time elements","user":{"login":"LaurentGoderre","id":1090826,"avatar_url":"https://avatars.githubusercontent.com/u/1090826?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurentGoderre","html_url":"https://github.com/LaurentGoderre","followers_url":"https://api.github.com/users/LaurentGoderre/followers","following_url":"https://api.github.com/users/LaurentGoderre/following{/other_user}","gists_url":"https://api.github.com/users/LaurentGoderre/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurentGoderre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurentGoderre/subscriptions","organizations_url":"https://api.github.com/users/LaurentGoderre/orgs","repos_url":"https://api.github.com/users/LaurentGoderre/repos","events_url":"https://api.github.com/users/LaurentGoderre/events{/privacy}","received_events_url":"https://api.github.com/users/LaurentGoderre/received_events","type":"User","site_admin":false},"body":"TODO: Separate the validation logic to validate the date and time separately","created_at":"2015-09-29T17:49:21Z","updated_at":"2015-09-30T00:55:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35f02a5424e9c813e58acd1c8f55de6ce5a33532","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88/commits","review_comments_url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88/comments","review_comment_url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-data/ckanext-scheming/issues/88/comments","statuses_url":"https://api.github.com/repos/open-data/ckanext-scheming/statuses/0bffddc68873ef97321aa3477c6be0554bd9a321","head":{"label":"LaurentGoderre:add-datetime-preset","ref":"add-datetime-preset","sha":"0bffddc68873ef97321aa3477c6be0554bd9a321","user":{"login":"LaurentGoderre","id":1090826,"avatar_url":"https://avatars.githubusercontent.com/u/1090826?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurentGoderre","html_url":"https://github.com/LaurentGoderre","followers_url":"https://api.github.com/users/LaurentGoderre/followers","following_url":"https://api.github.com/users/LaurentGoderre/following{/other_user}","gists_url":"https://api.github.com/users/LaurentGoderre/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurentGoderre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurentGoderre/subscriptions","organizations_url":"https://api.github.com/users/LaurentGoderre/orgs","repos_url":"https://api.github.com/users/LaurentGoderre/repos","events_url":"https://api.github.com/users/LaurentGoderre/events{/privacy}","received_events_url":"https://api.github.com/users/LaurentGoderre/received_events","type":"User","site_admin":false},"repo":{"id":39522303,"name":"ckanext-scheming","full_name":"LaurentGoderre/ckanext-scheming","owner":{"login":"LaurentGoderre","id":1090826,"avatar_url":"https://avatars.githubusercontent.com/u/1090826?v=3","gravatar_id":"","url":"https://api.github.com/users/LaurentGoderre","html_url":"https://github.com/LaurentGoderre","followers_url":"https://api.github.com/users/LaurentGoderre/followers","following_url":"https://api.github.com/users/LaurentGoderre/following{/other_user}","gists_url":"https://api.github.com/users/LaurentGoderre/gists{/gist_id}","starred_url":"https://api.github.com/users/LaurentGoderre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LaurentGoderre/subscriptions","organizations_url":"https://api.github.com/users/LaurentGoderre/orgs","repos_url":"https://api.github.com/users/LaurentGoderre/repos","events_url":"https://api.github.com/users/LaurentGoderre/events{/privacy}","received_events_url":"https://api.github.com/users/LaurentGoderre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LaurentGoderre/ckanext-scheming","description":"Easy, sharable custom CKAN schemas","fork":true,"url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming","forks_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/forks","keys_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/teams","hooks_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/hooks","issue_events_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/issues/events{/number}","events_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/events","assignees_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/assignees{/user}","branches_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/branches{/branch}","tags_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/tags","blobs_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/git/refs{/sha}","trees_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/statuses/{sha}","languages_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/languages","stargazers_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/stargazers","contributors_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/contributors","subscribers_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/subscribers","subscription_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/subscription","commits_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/commits{/sha}","git_commits_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/git/commits{/sha}","comments_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/comments{/number}","issue_comment_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/issues/comments{/number}","contents_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/contents/{+path}","compare_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/merges","archive_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/downloads","issues_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/issues{/number}","pulls_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/pulls{/number}","milestones_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/milestones{/number}","notifications_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/labels{/name}","releases_url":"https://api.github.com/repos/LaurentGoderre/ckanext-scheming/releases{/id}","created_at":"2015-07-22T18:11:17Z","updated_at":"2015-07-22T18:11:17Z","pushed_at":"2015-09-29T18:15:19Z","git_url":"git://github.com/LaurentGoderre/ckanext-scheming.git","ssh_url":"git@github.com:LaurentGoderre/ckanext-scheming.git","clone_url":"https://github.com/LaurentGoderre/ckanext-scheming.git","svn_url":"https://github.com/LaurentGoderre/ckanext-scheming","homepage":"","size":1020,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"master"}},"base":{"label":"open-data:master","ref":"master","sha":"969995b8593a95827f34533868ab5d698dbec2e0","user":{"login":"open-data","id":2651841,"avatar_url":"https://avatars.githubusercontent.com/u/2651841?v=3","gravatar_id":"","url":"https://api.github.com/users/open-data","html_url":"https://github.com/open-data","followers_url":"https://api.github.com/users/open-data/followers","following_url":"https://api.github.com/users/open-data/following{/other_user}","gists_url":"https://api.github.com/users/open-data/gists{/gist_id}","starred_url":"https://api.github.com/users/open-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-data/subscriptions","organizations_url":"https://api.github.com/users/open-data/orgs","repos_url":"https://api.github.com/users/open-data/repos","events_url":"https://api.github.com/users/open-data/events{/privacy}","received_events_url":"https://api.github.com/users/open-data/received_events","type":"Organization","site_admin":false},"repo":{"id":12762372,"name":"ckanext-scheming","full_name":"open-data/ckanext-scheming","owner":{"login":"open-data","id":2651841,"avatar_url":"https://avatars.githubusercontent.com/u/2651841?v=3","gravatar_id":"","url":"https://api.github.com/users/open-data","html_url":"https://github.com/open-data","followers_url":"https://api.github.com/users/open-data/followers","following_url":"https://api.github.com/users/open-data/following{/other_user}","gists_url":"https://api.github.com/users/open-data/gists{/gist_id}","starred_url":"https://api.github.com/users/open-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-data/subscriptions","organizations_url":"https://api.github.com/users/open-data/orgs","repos_url":"https://api.github.com/users/open-data/repos","events_url":"https://api.github.com/users/open-data/events{/privacy}","received_events_url":"https://api.github.com/users/open-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/open-data/ckanext-scheming","description":"Easy, sharable custom CKAN schemas","fork":false,"url":"https://api.github.com/repos/open-data/ckanext-scheming","forks_url":"https://api.github.com/repos/open-data/ckanext-scheming/forks","keys_url":"https://api.github.com/repos/open-data/ckanext-scheming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-data/ckanext-scheming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-data/ckanext-scheming/teams","hooks_url":"https://api.github.com/repos/open-data/ckanext-scheming/hooks","issue_events_url":"https://api.github.com/repos/open-data/ckanext-scheming/issues/events{/number}","events_url":"https://api.github.com/repos/open-data/ckanext-scheming/events","assignees_url":"https://api.github.com/repos/open-data/ckanext-scheming/assignees{/user}","branches_url":"https://api.github.com/repos/open-data/ckanext-scheming/branches{/branch}","tags_url":"https://api.github.com/repos/open-data/ckanext-scheming/tags","blobs_url":"https://api.github.com/repos/open-data/ckanext-scheming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-data/ckanext-scheming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-data/ckanext-scheming/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-data/ckanext-scheming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-data/ckanext-scheming/statuses/{sha}","languages_url":"https://api.github.com/repos/open-data/ckanext-scheming/languages","stargazers_url":"https://api.github.com/repos/open-data/ckanext-scheming/stargazers","contributors_url":"https://api.github.com/repos/open-data/ckanext-scheming/contributors","subscribers_url":"https://api.github.com/repos/open-data/ckanext-scheming/subscribers","subscription_url":"https://api.github.com/repos/open-data/ckanext-scheming/subscription","commits_url":"https://api.github.com/repos/open-data/ckanext-scheming/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-data/ckanext-scheming/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-data/ckanext-scheming/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-data/ckanext-scheming/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-data/ckanext-scheming/contents/{+path}","compare_url":"https://api.github.com/repos/open-data/ckanext-scheming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-data/ckanext-scheming/merges","archive_url":"https://api.github.com/repos/open-data/ckanext-scheming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-data/ckanext-scheming/downloads","issues_url":"https://api.github.com/repos/open-data/ckanext-scheming/issues{/number}","pulls_url":"https://api.github.com/repos/open-data/ckanext-scheming/pulls{/number}","milestones_url":"https://api.github.com/repos/open-data/ckanext-scheming/milestones{/number}","notifications_url":"https://api.github.com/repos/open-data/ckanext-scheming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-data/ckanext-scheming/labels{/name}","releases_url":"https://api.github.com/repos/open-data/ckanext-scheming/releases{/id}","created_at":"2013-09-11T17:14:08Z","updated_at":"2015-09-25T08:26:39Z","pushed_at":"2015-09-29T18:15:20Z","git_url":"git://github.com/open-data/ckanext-scheming.git","ssh_url":"git@github.com:open-data/ckanext-scheming.git","clone_url":"https://github.com/open-data/ckanext-scheming.git","svn_url":"https://github.com/open-data/ckanext-scheming","homepage":"","size":1020,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":20,"forks":21,"open_issues":20,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88"},"html":{"href":"https://github.com/open-data/ckanext-scheming/pull/88"},"issue":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/issues/88"},"comments":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/open-data/ckanext-scheming/statuses/0bffddc68873ef97321aa3477c6be0554bd9a321"}}}}