mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
feat: advance sitekey edit now allows modifying publication status
This commit is contained in:
@@ -16,6 +16,22 @@
|
||||
<. } .>
|
||||
<. let level = levels.len() + 1; .>
|
||||
<. include!("../add/advance/add-level.html"); .>
|
||||
|
||||
<label class="sitekey-form__label" for="publish_benchmarks">
|
||||
Anonymously publish CAPTCHA performance statistics to help other webmasters
|
||||
<input
|
||||
class="sitekey-form__input"
|
||||
type="checkbox"
|
||||
id="publish_benchmarks"
|
||||
name="publish_benchmarks"
|
||||
<. if publish_benchmarks { .>
|
||||
checked
|
||||
<. }.>
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
|
||||
<button data-sitekey="<.= key .>"
|
||||
id="sitekey-form__submit" class="sitekey-form__submit" type="submit">
|
||||
Submit
|
||||
|
||||
@@ -47,11 +47,19 @@ const submit = async (e: Event) => {
|
||||
|
||||
const key = BTN.get().dataset.sitekey;
|
||||
|
||||
|
||||
const PUBLISH_BENCHMARKS = <HTMLInputElement>(
|
||||
Add.FORM.querySelector("#publish_benchmarks")
|
||||
);
|
||||
|
||||
|
||||
|
||||
const payload = {
|
||||
levels,
|
||||
duration,
|
||||
description,
|
||||
key,
|
||||
publish_benchmarks: PUBLISH_BENCHMARKS.checked,
|
||||
};
|
||||
|
||||
console.debug(`[form submition] json payload: ${JSON.stringify(payload)}`);
|
||||
|
||||
Reference in New Issue
Block a user