# Webtie registrations form

## Publish
The dist files are published to npm. To publish the package make sure you have added the .npmrc file:
```
@webtie-ch:registry=https://registry.npmjs.org/
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=<YOUR-AUTH-TOKEN>
```

The auth token can be generated in the npmjs UI when logged in. 

## Include
Include the form over jsdeliver on any website.
All Versions are listed here: https://cdn.jsdelivr.net/npm/@webtie-ch/webtie-registrations-form/

For example the url for version 0.1.16 is: https://cdn.jsdelivr.net/npm/@webtie-ch/webtie-registrations-form@0.1.16/dist/index.js

To include the form on a website use the following template:

### V0
```
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Anmeldeformular</title>
<link href="index.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<body>
<div
        id="webtie-form-widget"
        class="webtie-form-widget"
        data-limits-endpoint="https://europe-west6-webtie-forms-2.cloudfunctions.net/registrationBackend/api/v1/limits/user/8UDhdOEA1wbBK86c4yZxH5tUEvi2"
        data-registration-endpoint="https://europe-west6-webtie-forms-2.cloudfunctions.net/registrationBackend/api/v1/registration/user/8UDhdOEA1wbBK86c4yZxH5tUEvi2"
        data-form-endpoint="https://europe-west6-webtie-forms-2.cloudfunctions.net/registrationBackend/api/v1/schema/user/8UDhdOEA1wbBK86c4yZxH5tUEvi2"
>
</div>
<script src="https://cdn.jsdelivr.net/npm/@webtie-ch/webtie-registrations-form@0.1.16/dist/index.js"></script>
</body>
</html>
```

### V1
```
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Anmeldeformular</title>
<link href="index.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<body>
<div
        id="webtie-form-widget"
        class="webtie-form-widget"
        data-endpoint="https://europe-west6-webtie-forms-2.cloudfunctions.net/registrationBackend/api/v1/"
        data-user="8UDhdOEA1wbBK86c4yZxH5tUEvi2"
>
</div>
<script src="https://cdn.jsdelivr.net/npm/@webtie-ch/webtie-registrations-form@1/dist/index.js"></script>
</body>
</html>
```



