This work was done with Claude. Added bundling of CSS & JS with WebPack. This also means minimization. --------- Co-authored-by: Martin Slachta <martin.slachta@outlook.com> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { RsvFormEncoder } from './RsvFormEncoder.js';
|
||||
import { show_notice } from '../../../src/components/admin.js';
|
||||
|
||||
/*
|
||||
* RsvAdminForm — shared submit handler for wp-admin forms.
|
||||
*
|
||||
@@ -13,7 +16,7 @@
|
||||
* refresh: () => my_datagrid.refresh(),
|
||||
* });
|
||||
*/
|
||||
const RsvAdminForm = {
|
||||
export const RsvAdminForm = {
|
||||
// Attach a submit listener that sends the form as JSON.
|
||||
bind(form, options = {}) {
|
||||
if (!form) return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const RsvFormEncoder = {
|
||||
export const RsvFormEncoder = {
|
||||
// Serialize form element into a plain JS object supporting arrays.
|
||||
// - Nested keys supported with dot notation: 'meta.email'
|
||||
// - Array notation supported with trailing [] (e.g. 'times[]') or multiple inputs with same name
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const RsvFormSender = {
|
||||
export const RsvFormSender = {
|
||||
get_form_url(form_id) {
|
||||
return ReservairServiceAPI.restUrl + '/form/' + form_id;
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const RsvInlineFormBuilder = {
|
||||
export const RsvInlineFormBuilder = {
|
||||
match_p(name, value) {
|
||||
return (form) => String(form[name]) === String(value);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user