Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for the `type: button` field with the following options: ```yaml button: type: button action: # button | link | popup (automatically determined by the values provider, if the value of the field is a URL or the href config is set (or the value of the field is a valid URL), then it'll be type link. If a handler is set, it'll be type popup. All other cases will be type: button) buttonLabel: # The label of the button itself. buttonType: # default | primary | success | info | warning | danger | link path: # Use a custom partial to render the button handler: # popup action only href: # link action only target: # link action only request: # button action only loading: # message to display while waiting for the request icon: 'icon-pencil' ``` Examples: Simple button with AJAX request: ```yaml _sync_ics: label: Actions buttonLabel: Sync type: button request: onSyncICS icon: 'icon-rotate' loading: Syncing... ``` Simple Link button: ```yaml places_url: type: button buttonType: primary buttonLabel: View on Google Maps icon: icon-map-location-dot target: _blank ``` Button triggering popup: ```yaml _btn_autofill: label: Autofill buttonLabel: Autofill Club Information type: button handler: onRenderAutofillPopup buttonType: primary icon: icon-map-location-dot ``` Documented by wintercms/docs@960255d
- Loading branch information