F
Filamentβ€’15mo ago
Chriis

How can I modify attach action form title and buttons ?

No description
8 Replies
Patrick Boivin
Patrick Boivinβ€’15mo ago
For the heading : ->modalHeading('Attacher un utilisateur') Which button would you like to change?
Chriis
ChriisOPβ€’15mo ago
Ok thx I would like to change the verb "attach" So for "Attach" and "Create and attach another" I have already changed the label of the attach action in the relation manager table header. These buttons are the last things with "attach" in it
toeknee
toekneeβ€’15mo ago
Just a standard Laravel language override
Chriis
ChriisOPβ€’15mo ago
Ok, what is the best practice for this ? I have published the action package, so I change directly the default string or there is a better way ? Oh and also is there a way to publish only one language, with like a flag in the artisan command ? I have found nothing on this ...
Patrick Boivin
Patrick Boivinβ€’15mo ago
I think after running artisan vendor:publish for translations, you can delete the languages you don't want to modify. It knows to find them still in the vendor directory.
Chriis
ChriisOPβ€’15mo ago
Ok its currently what I do, I was just curious if there was a way to avoid this but its fine πŸ™‚ thx
Patrick Boivin
Patrick Boivinβ€’15mo ago
I think there's one other way. Just a sec, I need to look in my projects. You can use modalSubmitActionLabel() and modalCancelActionLabel() but the "... and add another" doesn't seem to have a method like that. You have to update the translations.
Chriis
ChriisOPβ€’15mo ago
Oh ok. I was actually talking about manually deleting the unused lang files but thanks πŸ™‚ I'm going to try these
Want results from more Discord servers?
Add your server