jQuery Consent

A jQuery extension that simplifies the process of adding GDPR compliance to existing webforms. It allows web developers to easily integrate GDPR compliance into their existing forms using decentralized and self-sovereign identities. This extension solves the problem of allowing data providers (web users) to revoke consent given at a later time.

by stromdao

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="https://energychain.github.io/tydids-jquery-consent/dist/tydids-jquery-consent.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<!DOCTYPE html>
<html data-bs-theme="light" lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>Tydids-jQuery-Consent</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <h1>Showcase for: <a href="https://github.com/energychain/tydids-jquery-consent">Tydids-jQuery-Consent</a></h1>
        <p>jQuery extension for TyDIDs Self-Sovereign Identity and Consent Management.</p>
        <form>
            <div class="input-group"><span class="input-group-text">Firstname</span><input class="form-control" type="text" name="firstname"></div>
            <div class="input-group"><span class="input-group-text">Lastname</span><input class="form-control" type="text" name="lastname"></div>
            <div class="form-check"><input class="form-check-input" type="checkbox" id="consentCheck" name="consentCheck" signature="signature" payload="payload" identity="identity" submit="submit" required=""><label class="form-check-label" for="formCheck-1">I consent ...&nbsp; ...the html file downloaded by checking the box allows me to revoke my consent.</label></div>
            <input class="btn btn-primary" type="submit" id="submit">
        </form>
        <hr/>
        <h2>Some fields that could be optionally used</h2>
        <p>(Hint: Specify field id with attribute of checkbox)</p>
        <div class="input-group"><span class="input-group-text">identity</span><input class="form-control" type="text" id="identity" name="identity" readonly></div>
        <div class="input-group"><span...

JavaScript

$(document).ready(function() {        
        $('#consentCheck').tydisConsent();
});