dmitrybubyakin / nova-medialibrary-field

Laravel Nova field for managing the Spatie media library
MIT License
263 stars 61 forks source link

Automatically open custom properties modal after choosing an image #246 #116

Open moustafaart4muslim opened 3 years ago

moustafaart4muslim commented 3 years ago

Can't find a way to automatically open custom properties modal after choosing an image.

dmitrybubyakin commented 3 years ago

@moustafaart4muslim Could you please provide more details?

moustafaart4muslim commented 3 years ago

Thank you for your fast reply.

What I'm trying to do, is to make the custom properties modal (Feilds modal )automatically open after choosing a media file, To force the user to fill these fields(custom preoprties).

In another way, I want to trigger click on the (edit media button) when the user chooses an image.

@dmitrybubyakin

dmitrybubyakin commented 3 years ago

@moustafaart4muslim Do you want the user to fill these fields before or after uploading?

moustafaart4muslim commented 3 years ago

I prefer before uploading. @dmitrybubyakin

dmitrybubyakin commented 3 years ago

@moustafaart4muslim There is no ability to fill the fields before uploading.

moustafaart4muslim commented 3 years ago

So how can I achieve this after uploading? @dmitrybubyakin

dmitrybubyakin commented 3 years ago

@moustafaart4muslim Right now - you cannot. It requires some customisation.

moustafaart4muslim commented 3 years ago

OK, but there is a problem may be considered related to this request. I can create the resource without setting the fields that are set to have the (required) rule, I think this have to has a fix, either by forcing the modal to open just after upload to force user to enter the required fields, or by processing the required validation on all attached media files when the clicks on create resource.

@dmitrybubyakin

dmitrybubyakin commented 3 years ago

@moustafaart4muslim I'll try to cover this in the next release. Thank you for the idea.