cipf v0.3.13 paypal credentials now from admin menu
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
|
||||
cipf_admin_activate_prof_form
|
||||
*/
|
||||
|
||||
function admin_activate_form_submit_prevent_CIPF() {
|
||||
let form_activate_prof = document.querySelector('#cipf_admin_activate_prof_form form');
|
||||
console.log("form:");
|
||||
console.log(form_activate_prof);
|
||||
if (form_activate_prof === null)
|
||||
return;
|
||||
|
||||
function handle_form(event) {
|
||||
event.preventDefault();
|
||||
let form_data = new FormData(event.target);
|
||||
for (var pair of form_data.entries()) {
|
||||
console.log(pair[0]+ ': ' + pair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
form_activate_prof.addEventListener('submit', handle_form);
|
||||
}
|
||||
admin_activate_form_submit_prevent_CIPF();
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
import { test_fetch } from './example_submenu.js';
|
||||
|
||||
test_fetch();
|
||||
@@ -1,29 +0,0 @@
|
||||
|
||||
const inputElement2 = document.getElementById('mytext_2');
|
||||
const sendButton2 = document.getElementById('mybutton_2');
|
||||
|
||||
sendButton2.addEventListener('click', () => {
|
||||
let inputValue = inputElement2.value;
|
||||
inputValue = {
|
||||
key1: 'value1',
|
||||
key2: 'value2'
|
||||
};
|
||||
inputValue = JSON.stringify(inputValue);
|
||||
console.log("inputValue:");
|
||||
console.log(inputValue);
|
||||
PLGNTLS_fetch('/plgntls/get_data', {
|
||||
method: "POST",
|
||||
})
|
||||
//PLGNTLS_fetch('get_data', {body: {inputValue}})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log("dataaa: ");
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("error: ");
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
import { PLGNTLS_fetch } from '../../utils/plgntls_fetch.js';
|
||||
|
||||
export function test_fetch() {
|
||||
const inputElement = document.getElementById('mytext');
|
||||
const sendButton = document.getElementById('mybutton');
|
||||
|
||||
sendButton.addEventListener('click', () => {
|
||||
let inputValue = inputElement.value;
|
||||
inputValue = {
|
||||
key1: 'value1',
|
||||
key2: 'value2'
|
||||
};
|
||||
inputValue = JSON.stringify(inputValue);
|
||||
console.log("inputValue:");
|
||||
console.log(inputValue);
|
||||
PLGNTLS_fetch('/plgntls/get_data', {
|
||||
method: "POST",
|
||||
})
|
||||
//PLGNTLS_fetch('get_data', {body: {inputValue}})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log("dataaa: ");
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("error: ");
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user