v0.1: replace shell-rendered site with Grav-native pages + theme
- Drop site/ + RenderSite.sh: repo now carries grav/user/pages as native Grav markdown pages (home/services/terms/sign/execution) - Add knel-contract theme: inherits quark2 via stream fallback, adds sign.html.twig (Twig) driving the DocuSeal flow through the APISIX gateway; esign wiring lives in the theme yaml for forks to retarget - CreateDocument.sh refreshes the Grav services page from the rendered catalogs instead of invoking the removed site renderer Ticket: https://projects.knownelement.com/issues/924
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: 'Sign Electronically'
|
||||
visible: true
|
||||
---
|
||||
|
||||
## Sign this contract electronically
|
||||
|
||||
This contract can be executed electronically via the KNEL DocuSeal e-signature platform, reached through the KNEL APISIX API gateway. Enter the signer's details below; DocuSeal will email a signing link.
|
||||
|
||||
<form id="esign-form" onsubmit="return esignSubmit(event)">
|
||||
<label for="esign-name">Full name</label>
|
||||
<input type="text" id="esign-name" name="name" required style="display:block;margin-bottom:8px;min-width:280px;padding:6px;">
|
||||
<label for="esign-email">Email address</label>
|
||||
<input type="email" id="esign-email" name="email" required style="display:block;margin-bottom:12px;min-width:280px;padding:6px;">
|
||||
<label for="esign-entity">Entity (Party 2)</label>
|
||||
<input type="text" id="esign-entity" name="entity" required style="display:block;margin-bottom:12px;min-width:280px;padding:6px;">
|
||||
<button type="submit" style="padding:8px 16px;">Request signature link</button>
|
||||
</form>
|
||||
|
||||
<p id="esign-status" style="margin-top:12px;"></p>
|
||||
|
||||
<script>
|
||||
function esignSubmit(ev) {
|
||||
ev.preventDefault();
|
||||
var status = document.getElementById('esign-status');
|
||||
status.textContent = 'Requesting signing link…';
|
||||
var name = document.getElementById('esign-name').value;
|
||||
var email = document.getElementById('esign-email').value;
|
||||
var entity = document.getElementById('esign-entity').value;
|
||||
fetch('{{ESIGN_API_URL}}', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({
|
||||
template_id: Number('{{ESIGN_TEMPLATE_ID}}'),
|
||||
submitters: [
|
||||
{email: email, name: name, role: 'First Party'},
|
||||
{email: email, name: name + ' (' + entity + ')', role: 'Second Party', is_invited: false}
|
||||
]
|
||||
})
|
||||
}).then(function (r) {
|
||||
if (!r.ok) throw new Error('gateway returned ' + r.status);
|
||||
return r.json();
|
||||
}).then(function (data) {
|
||||
var slug = data.submitters && data.submitters[0] && data.submitters[0].slug;
|
||||
if (slug) {
|
||||
window.location.href = 'https://esign.knownelement.com/s/' + slug;
|
||||
} else {
|
||||
status.textContent = 'Signing request created. Check ' + email + ' for the signing link.';
|
||||
}
|
||||
}).catch(function (e) {
|
||||
status.textContent = 'Could not create the signing request (' + e.message + '). Contact KNEL helpdesk.';
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user