Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1263103
create.views.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
924 B
Referenced Files
None
Subscribers
None
create.views.ts
View Options
import
{
BaseContext
}
from
"koa"
;
import
{
Errors
}
from
"sealious"
;
import
RegistrationIntents
from
"../../../collections/registration-intents"
;
import
html
from
"../../../html"
;
import
{
CollectionTiedFormData
}
from
"../../common/form"
;
import
navbar
from
"../../common/navbar"
;
import
input
from
"../../common/ui/input"
;
export
function
createAccountForm
(
ctx
:
BaseContext
,
{
values
,
errors
}
:
CollectionTiedFormData
<
RegistrationIntents
>
=
{
values
:
{},
}
)
{
errors
=
errors
||
new
Errors
.
FieldsError
(
ctx
.
$app
.
collections
[
"registration-intents"
],
{});
// empty error;
return
html
(
ctx
,
/* HTML */
`<title>Sign up</title>
${
navbar
(
ctx
)
}
<h1>Register</h1>
<form action="/account/create" method="POST">
${
input
({
name
:
"email"
,
value
:
values
.
email
,
type
:
"email"
,
error
:
errors
.
getErrorForField
(
"email"
),
}
)}
<input type="submit" value="register" />
</form>`
);
}
File Metadata
Details
Attached
Mime Type
text/html
Expires
Fri, Jan 24, 16:50 (7 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
600002
Default Alt Text
create.views.ts (924 B)
Attached To
Mode
rPLAY Sealious playground
Attached
Detach File
Event Timeline
Log In to Comment