{"action":"created","issue":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/3849","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/3849/labels{/name}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/3849/comments","events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/3849/events","html_url":"https://github.com/activeadmin/activeadmin/pull/3849","id":60441609,"number":3849,"title":"dynamic labels for modal dialog forms","user":{"login":"AndrewSwerlick","id":1028917,"avatar_url":"https://avatars.githubusercontent.com/u/1028917?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewSwerlick","html_url":"https://github.com/AndrewSwerlick","followers_url":"https://api.github.com/users/AndrewSwerlick/followers","following_url":"https://api.github.com/users/AndrewSwerlick/following{/other_user}","gists_url":"https://api.github.com/users/AndrewSwerlick/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewSwerlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewSwerlick/subscriptions","organizations_url":"https://api.github.com/users/AndrewSwerlick/orgs","repos_url":"https://api.github.com/users/AndrewSwerlick/repos","events_url":"https://api.github.com/users/AndrewSwerlick/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewSwerlick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-10T02:28:06Z","updated_at":"2015-03-11T13:19:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/3849","html_url":"https://github.com/activeadmin/activeadmin/pull/3849","diff_url":"https://github.com/activeadmin/activeadmin/pull/3849.diff","patch_url":"https://github.com/activeadmin/activeadmin/pull/3849.patch"},"body":"extending modal_dialog.js.coffee so that the input definition can include a seperate label option. This allows dynamic server side generated labels with consistent name fields\r\n\r\nIn particular, we're using this in a situation where some of our batch action forms have a popup with a form where the user can choose to apply the action to all records meeting the current filter criteria, not just the visible ones. The label for the checkbox input, needs to include the total count of records. This change allows us to do that. It's good for any situation where you need dynamic labels, particularly on batch actions."},"comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments/78260867","html_url":"https://github.com/activeadmin/activeadmin/pull/3849#issuecomment-78260867","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/3849","id":78260867,"user":{"login":"AndrewSwerlick","id":1028917,"avatar_url":"https://avatars.githubusercontent.com/u/1028917?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewSwerlick","html_url":"https://github.com/AndrewSwerlick","followers_url":"https://api.github.com/users/AndrewSwerlick/followers","following_url":"https://api.github.com/users/AndrewSwerlick/following{/other_user}","gists_url":"https://api.github.com/users/AndrewSwerlick/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewSwerlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewSwerlick/subscriptions","organizations_url":"https://api.github.com/users/AndrewSwerlick/orgs","repos_url":"https://api.github.com/users/AndrewSwerlick/repos","events_url":"https://api.github.com/users/AndrewSwerlick/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewSwerlick/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T13:19:37Z","updated_at":"2015-03-11T13:19:37Z","body":"It's fine if this doesn't fit into the long term vision for form management, and I agree that area probably needs a larger revision anyways. I implemented this because I needed something like #2375 today in the app I'm working on, and this seemed to be a simple, low impactful way to get it, since I could just monkey patch ``ActiveAdmin.modal_dialog``. I figured I'd submit a pull request since I saw some theoretical broader applications.\r\n\r\nPersonally I don't have any other real world examples."}}