add radio and checkboxes steps

This commit is contained in:
Alex Turchyn
2023-05-23 22:10:05 +03:00
parent 90e579ad01
commit f1da37d1ec
4 changed files with 67 additions and 18 deletions
+5 -1
View File
@@ -7,7 +7,9 @@ import { DirectUpload } from '@rails/activestorage'
export default actionable(targetable(class extends HTMLElement {
static [target.static] = [
'canvas',
'input'
'input',
'okButton',
'clearButton'
]
connectedCallback () {
@@ -17,6 +19,8 @@ export default actionable(targetable(class extends HTMLElement {
submit (e) {
e?.preventDefault()
this.okButton.disabled = true
this.canvas.toBlob((blob) => {
const file = new File([blob], 'signature.jpg', { type: 'image/jpg' })