mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
feat: advance siteey create now allows setting publication status
This commit is contained in:
@@ -45,5 +45,16 @@
|
||||
<. } .>
|
||||
<. } .>
|
||||
|
||||
<label class="sitekey-form__label" for="publish_benchmarks">
|
||||
Anonymously publish CAPTCHA performance statistics to help other webmasters
|
||||
<input
|
||||
class="sitekey-form__input"
|
||||
type="checkbox"
|
||||
name="publish_benchmarks"
|
||||
id="publish_benchmarks"
|
||||
/>
|
||||
</label>
|
||||
|
||||
|
||||
<button class="sitekey-form__submit" type="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
@@ -38,6 +38,13 @@ export const addSubmitEventListener = (): void =>
|
||||
const submit = async (e: Event) => {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
const PUBLISH_BENCHMARKS = <HTMLInputElement>(
|
||||
FORM.querySelector("#publish_benchmarks")
|
||||
);
|
||||
|
||||
|
||||
|
||||
const description = validateDescription(e);
|
||||
const duration = validateDuration();
|
||||
|
||||
@@ -50,6 +57,7 @@ const submit = async (e: Event) => {
|
||||
levels: levels,
|
||||
duration,
|
||||
description,
|
||||
publish_benchmarks: PUBLISH_BENCHMARKS.checked,
|
||||
};
|
||||
|
||||
console.debug(`[form submition] json payload: ${JSON.stringify(payload)}`);
|
||||
|
||||
Reference in New Issue
Block a user