init
This commit is contained in:
15
priv/js/form_init.js
Normal file
15
priv/js/form_init.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// Generic init script for a supervised form runtime. The supervisor
|
||||
// (Forum.Forms) injects two globals via QuickBEAM's :define
|
||||
// option before this script runs:
|
||||
//
|
||||
// className: string - e.g. "Task"
|
||||
// formData: object - attributes + content from the source element
|
||||
//
|
||||
// We build a class with the requested name that extends Form, then
|
||||
// instantiate it. The instance lives for the life of this runtime.
|
||||
|
||||
class Form {
|
||||
constructor(data) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user