Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F437964
PHUIFormMultiSubmitControl.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PHUIFormMultiSubmitControl.php
View Options
<?php
final
class
PHUIFormMultiSubmitControl
extends
AphrontFormControl
{
private
$buttons
=
array
();
public
function
addBackButton
(
$label
=
null
)
{
if
(
$label
===
null
)
{
$label
=
"
\x
C2
\x
AB "
.
pht
(
'Back'
);
}
return
$this
->
addButton
(
'__back__'
,
$label
,
'grey'
);
}
public
function
addSubmitButton
(
$label
)
{
return
$this
->
addButton
(
'__submit__'
,
$label
);
}
public
function
addCancelButton
(
$uri
,
$label
=
null
)
{
if
(
$label
===
null
)
{
$label
=
pht
(
'Cancel'
);
}
$this
->
buttons
[]
=
phutil_tag
(
'a'
,
array
(
'class'
=>
'grey button'
,
'href'
=>
$uri
,
),
$label
);
return
$this
;
}
public
function
addButtonView
(
PHUIButtonView
$button
)
{
$this
->
buttons
[]
=
$button
;
return
$this
;
}
public
function
addButton
(
$name
,
$label
,
$class
=
null
)
{
$this
->
buttons
[]
=
javelin_tag
(
'input'
,
array
(
'type'
=>
'submit'
,
'name'
=>
$name
,
'value'
=>
$label
,
'class'
=>
$class
,
'sigil'
=>
'alternate-submit-button'
,
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
));
return
$this
;
}
protected
function
getCustomControlClass
()
{
return
'phui-form-control-multi-submit'
;
}
protected
function
renderInput
()
{
return
array_reverse
(
$this
->
buttons
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 2:01 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
62797
Default Alt Text
PHUIFormMultiSubmitControl.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment