Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98106095
PHUIFormMultiSubmitControl.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 9, 20:39
Size
882 B
Mime Type
text/x-php
Expires
Sat, Jan 11, 20:39 (2 d)
Engine
blob
Format
Raw Data
Handle
23506831
Attached To
rPH Phabricator
PHUIFormMultiSubmitControl.php
View Options
<?php
final
class
PHUIFormMultiSubmitControl
extends
AphrontFormControl
{
private
$buttons
=
array
();
public
function
addBackButton
(
$label
=
null
)
{
if
(
$label
===
null
)
{
$label
=
pht
(
"
\x
C2
\x
AB Back"
);
}
return
$this
->
addButton
(
'__back__'
,
$label
,
'grey'
);
}
public
function
addSubmitButton
(
$label
)
{
return
$this
->
addButton
(
'__submit__'
,
$label
);
}
public
function
addButton
(
$name
,
$label
,
$class
=
null
)
{
$this
->
buttons
[]
=
phutil_tag
(
'input'
,
array
(
'type'
=>
'submit'
,
'name'
=>
$name
,
'value'
=>
$label
,
'class'
=>
$class
,
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
));
}
protected
function
getCustomControlClass
()
{
return
'phui-form-control-multi-submit'
;
}
protected
function
renderInput
()
{
return
array_reverse
(
$this
->
buttons
);
}
}
Event Timeline
Log In to Comment