Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4094000
AmcEnableForm.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AmcEnableForm.js
View Options
const
Button
=
require
(
'../Button'
),
util
=
require
(
'../util'
),
View
=
require
(
'../View'
);
/**
* @typedef {Object} FormField
* @private
* @property {string} name
* @property {string} value
*/
/**
* A form for enabling the advanced mobile editor mode.
*
* @param {Object} options
* @param {string} options.postUrl Form will POST to this endpoint
* @param {FormField[]} options.fields An array of hidden form fields
* @param {string} options.buttonLabel Label for submit button
* submitted
* @extends module:mobile.startup/View
* @ignore
*/
class
AmcEnableForm
extends
View
{
/** @inheritdoc */
get
isTemplateMode
()
{
return
true
;
}
/** @inheritdoc */
get
template
()
{
return
util
.
template
(
`
<form class="amc-enable-form" action="{{postUrl}}" method="POST">
{{#fields}}
<input type="hidden" name="{{name}}" value="{{value}}">
{{/fields}}
</form>
`
);
}
/** @inheritdoc */
postRender
()
{
this
.
$el
.
append
(
new
Button
(
{
tagName
:
'button'
,
progressive
:
true
,
label
:
this
.
options
.
buttonLabel
}
).
$el
);
}
}
module
.
exports
=
AmcEnableForm
;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Aug 18 2026, 13:05 (4 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
26/c1/c1636bf124441a5381e542d36a10
Default Alt Text
AmcEnableForm.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment