Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010730
checkbox.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
688 B
Referenced Files
None
Subscribers
None
checkbox.ts
View Options
import
{
Context
}
from
"koa"
;
import
{
FormDataValue
}
from
"../form-types.js"
;
import
{
Tickable
,
TickableOptions
}
from
"./tickable.js"
;
import
{
FormField
}
from
"../fields/field.js"
;
export
class
Checkbox
extends
Tickable
<
boolean
>
{
type
=
<
const
>
"checkbox"
;
isChecked
(
_ctx
:
Context
,
_data
:
Record
<
string
,
FormDataValue
>
,
value
:
boolean
)
:
boolean
{
return
value
;
}
getValueAttribute
()
:
string
{
return
""
;
}
}
export
class
CheckboxWithValue
extends
Checkbox
{
constructor
(
public
field
:
FormField
<
boolean
,
boolean
>
,
options
:
TickableOptions
,
public
value
:
string
)
{
super
(
field
,
options
);
}
getValueAttribute
()
:
string
{
return
this
.
value
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:46 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
634649
Default Alt Text
checkbox.ts (688 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment