{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5511","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5511/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5511/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5511/events","html_url":"https://github.com/OrchardCMS/Orchard/pull/5511","id":95027639,"number":5511,"title":"#5401: Add a NumField DynamicForms Element","user":{"login":"jtkech","id":8586360,"avatar_url":"https://avatars.githubusercontent.com/u/8586360?v=3","gravatar_id":"","url":"https://api.github.com/users/jtkech","html_url":"https://github.com/jtkech","followers_url":"https://api.github.com/users/jtkech/followers","following_url":"https://api.github.com/users/jtkech/following{/other_user}","gists_url":"https://api.github.com/users/jtkech/gists{/gist_id}","starred_url":"https://api.github.com/users/jtkech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtkech/subscriptions","organizations_url":"https://api.github.com/users/jtkech/orgs","repos_url":"https://api.github.com/users/jtkech/repos","events_url":"https://api.github.com/users/jtkech/events{/privacy}","received_events_url":"https://api.github.com/users/jtkech/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-14T20:02:15Z","updated_at":"2015-09-08T17:14:46Z","closed_at":"2015-09-03T19:08:52Z","pull_request":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/5511","html_url":"https://github.com/OrchardCMS/Orchard/pull/5511","diff_url":"https://github.com/OrchardCMS/Orchard/pull/5511.diff","patch_url":"https://github.com/OrchardCMS/Orchard/pull/5511.patch"},"body":"Fixes #5401\r\n\r\nIt's a first attempt to add a NumField to the DynamicForms elements, and that needs to be checked because it was not so simple to implement globalization, particularly on client side...\r\n\r\nIt would be simpler to use an input tag of type number that normally allows, for the same form value, to input a value in different cultures (e.g with Chrome). But this is not well implemented in all browsers (e.g with IE 10)... So, I revert back to an input of type text\r\n\r\nThen, because client validation can be enabled and jquery validate isn't culture aware, I needed to add some scripts as globalize.js and cldr.js (Unicode Common Locale Data Repository). But cldr needs many json files in many cultures. So, I've used a dynamic json object with only the necessary data (to parse numbers) grabbed on server side from the current culture\r\n\r\nFor the validation settings, I also force the user to use the current culture. Not sure it's done in the correct way with this special case of model updating. But maybe, here, it's not necessary to worry about the current culture, let me know...\r\n\r\nNote: Beyond my changes, when I built the gulpfile I got this error on client side\r\n\r\n    Cannot read property 'adapters' of undefined\r\n\r\nIn gulpfile.js, I needed to use these script files in this order\r\n\r\n    \"Scripts/Lib/jquery.validate.unobtrusive.js\",\r\n    \"Scripts/Lib/jquery.validate.unobtrusive.additional.js\",\r\n\r\nBest"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/138637957","html_url":"https://github.com/OrchardCMS/Orchard/pull/5511#issuecomment-138637957","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5511","id":138637957,"user":{"login":"sfmskywalker","id":938393,"avatar_url":"https://avatars.githubusercontent.com/u/938393?v=3","gravatar_id":"","url":"https://api.github.com/users/sfmskywalker","html_url":"https://github.com/sfmskywalker","followers_url":"https://api.github.com/users/sfmskywalker/followers","following_url":"https://api.github.com/users/sfmskywalker/following{/other_user}","gists_url":"https://api.github.com/users/sfmskywalker/gists{/gist_id}","starred_url":"https://api.github.com/users/sfmskywalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfmskywalker/subscriptions","organizations_url":"https://api.github.com/users/sfmskywalker/orgs","repos_url":"https://api.github.com/users/sfmskywalker/repos","events_url":"https://api.github.com/users/sfmskywalker/events{/privacy}","received_events_url":"https://api.github.com/users/sfmskywalker/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T17:14:46Z","updated_at":"2015-09-08T17:14:46Z","body":":D"}}