Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010876
disallow-update.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
779 B
Referenced Files
None
Subscribers
None
disallow-update.ts
View Options
import
{
Field
,
Context
}
from
"../../../main"
;
import
{
HybridField
}
from
"../../../chip-types/field"
;
export
default
class
DisallowUpdate
<
T
extends
Field
>
extends
HybridField
<
T
>
{
typeName
=
"disallow-update"
;
async
isProperValue
(
context
:
Context
,
new_value
:
Parameters
<
T
[
"checkValue"
]
>
[
1
],
old_value
?:
Parameters
<
T
[
"checkValue"
]
>
[
2
],
new_value_blessing_token
:
symbol
|
null
=
null
)
{
context
.
app
.
Logger
.
debug3
(
"DISALLOW-UPDATE"
,
"Checking if this field already has a value"
,
{
new_value
,
old_value
}
);
if
(
old_value
===
undefined
)
{
return
this
.
virtual_field
.
checkValue
(
new
context
.
app
.
SuperContext
(),
new_value
,
old_value
,
new_value_blessing_token
);
}
return
Field
.
invalid
(
context
.
app
.
i18n
(
"invalid_update"
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:48 (22 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625823
Default Alt Text
disallow-update.ts (779 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment