Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F485743
PHUIFormNumberControl.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
PHUIFormNumberControl.php
View Options
<?php
final
class
PHUIFormNumberControl
extends
AphrontFormControl
{
private
$disableAutocomplete
;
private
$autofocus
;
public
function
setDisableAutocomplete
(
$disable_autocomplete
)
{
$this
->
disableAutocomplete
=
$disable_autocomplete
;
return
$this
;
}
public
function
getDisableAutocomplete
()
{
return
$this
->
disableAutocomplete
;
}
public
function
setAutofocus
(
$autofocus
)
{
$this
->
autofocus
=
$autofocus
;
return
$this
;
}
public
function
getAutofocus
()
{
return
$this
->
autofocus
;
}
protected
function
getCustomControlClass
()
{
return
'phui-form-number'
;
}
protected
function
renderInput
()
{
if
(
$this
->
getDisableAutocomplete
())
{
$autocomplete
=
'off'
;
}
else
{
$autocomplete
=
null
;
}
return
javelin_tag
(
'input'
,
array
(
'type'
=>
'text'
,
'pattern'
=>
'
\d
*'
,
'name'
=>
$this
->
getName
(),
'value'
=>
$this
->
getValue
(),
'disabled'
=>
$this
->
getDisabled
()
?
'disabled'
:
null
,
'autocomplete'
=>
$autocomplete
,
'id'
=>
$this
->
getID
(),
'autofocus'
=>
(
$this
->
getAutofocus
()
?
'autofocus'
:
null
),
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, May 7, 5:07 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
84303
Default Alt Text
PHUIFormNumberControl.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment