-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override text of "Remove" button from has_many form builder for specified resource #5283
Comments
Seems localized to me? activeadmin/lib/active_admin/form_builder.rb Line 110 in c1b2889
|
Hi @varyonic, that allows for site-wide changes, right? I want to make a change to a single page / model. Is there a way to do that that I'm missing? Sorry for not being specific about that in my OP. |
For a single model, eg. Offer, see if this works: en:
active_admin:
resources:
offer:
has_many_remove: 'Remove Offer' My guess is it won't, and the fix is to add localizer logic to form_builder like in Resource::ActionItems. |
This works for site-wide if I change config/locales/en.yml:
but I tried what you suggested above for two different models and it doesn't seem to like it :(. |
I'm using activeadmin 1.0.0.pre1, by the way. Not sure if that makes a difference? |
Right, so further work is needed to make has_many remove button customizable in same way as action items. I don't think it was deliberately left out, just missed/forgotten/deferred, feel free to work on it. |
@varyonic I'd appreciate I could listen to any opinion if you have. |
Hi, I'd like to work on this ticket. |
There doesn't seem to be a straightforward way to change the text of the "Remove" button (to, in my case, something like "Hide") in the has_many form builder, .i.e., f.has_many, on a single page/model and not site-wide. I just want to confirm that is the case. If so, was there a specific reason this was left out? I can submit a PR to make it changeable if that helps.
The text was updated successfully, but these errors were encountered: