pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

Enhancement: Toggle add file button on single file field #7315

Open heybran opened 1 week ago

heybran commented 1 week ago

Description

On file field, if it's a single file field (file_limit equals to 1), once an file has been added, we can hide the Add file button, once this file is deleted, then the button will show again, so the original situation reported on the issue can be fixed.

Related GitHub issue(s)

7120

Testing instructions

  1. Create a single file field
  2. Go to post type
  3. First you will see the Add file button
  4. Add a file then Add file button will be hidden
  5. Once file is deleted, Add file button will be shown again

Screenshots / screencast

https://github.com/pods-framework/pods/assets/75633537/b359a6ba-178d-47ae-9b57-5a794034f9a3

Changelog text for these changes

Enhancement: Single file field now have better user experience. (@heybran)

PR checklist