Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F108358021
AphrontFormSubmitControl.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
Wed, Apr 16, 04:33
Size
846 B
Mime Type
text/x-php
Expires
Fri, Apr 18, 04:33 (2 d)
Engine
blob
Format
Raw Data
Handle
25585135
Attached To
rPH Phabricator
AphrontFormSubmitControl.php
View Options
<?php
final
class
AphrontFormSubmitControl
extends
AphrontFormControl
{
protected
$cancelButton
;
public
function
addCancelButton
(
$href
,
$label
=
'Cancel'
)
{
$this
->
cancelButton
=
phutil_tag
(
'a'
,
array
(
'href'
=>
$href
,
'class'
=>
'button grey'
,
),
$label
);
return
$this
;
}
protected
function
getCustomControlClass
()
{
return
'aphront-form-control-submit'
;
}
protected
function
renderInput
()
{
$submit_button
=
null
;
if
(
$this
->
getValue
())
{
$submit_button
=
phutil_tag
(
'button'
,
array
(
'type'
=>
'submit'
,
'name'
=>
'__submit__'
,
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
),
$this
->
getValue
());
}
return
hsprintf
(
'%s%s'
,
$submit_button
,
$this
->
cancelButton
);
}
}
Event Timeline
Log In to Comment