Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7317704
collapsible-checkbox-group.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
collapsible-checkbox-group.ts
View Options
import
{
Context
}
from
"koa"
;
import
{
FlatTemplatable
}
from
"tempstream"
;
import
{
FormDataValue
,
FormMessage
}
from
"../form"
;
import
{
CheckboxWithValue
}
from
"./checkbox"
;
import
{
FieldGroup
,
FormFieldControl
}
from
"./controls"
;
import
{
CheckboxGroup
,
DefaultCheckboxOptions
}
from
"./checkbox-group"
;
import
{
CollapsibleFieldGroup
}
from
"./collapsible-field-group"
;
export
class
CollapsibleCheckboxGroup
extends
CheckboxGroup
<
DefaultCheckboxOptions
&
{
textWhenOpen
?:
string
;
textWhenClosed
?:
string
;
groupID
?:
string
;
}
>
{
wrapGroup
(
ctx
:
Context
,
data
:
Record
<
string
,
FormDataValue
>
,
messages
:
FormMessage
[],
field_prefix
:
string
,
form_id
:
string
,
checkboxes
:
CheckboxWithValue
[],
show_field_errors
:
boolean
)
:
Promise
<
FlatTemplatable
>
{
return
new
CollapsibleFieldGroup
(
checkboxes
,
{
label
:
this
.
options
.
label
,
textWhenOpen
:
this
.
options
.
textWhenOpen
,
textWhenClosed
:
this
.
options
.
textWhenClosed
,
groupID
:
this
.
options
.
groupID
,
}).
render
(
ctx
,
data
,
messages
,
field_prefix
,
form_id
,
show_field_errors
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Jul 13, 04:59 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
802955
Default Alt Text
collapsible-checkbox-group.ts (1 KB)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment