Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100909297
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
Mon, Feb 3, 20:45
Size
792 B
Mime Type
text/x-php
Expires
Wed, Feb 5, 20:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24048906
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
(
'name'
=>
'__submit__'
,
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
),
$this
->
getValue
());
}
return
$submit_button
.
$this
->
cancelButton
;
}
}
Event Timeline
Log In to Comment