~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to phabricator/src/view/form/control/AphrontFormPasswordControl.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-10-23 20:49:26 UTC
  • Revision ID: package-import@ubuntu.com-20141023204926-ar20vnfjqwxysrce
Tags: upstream-0~git20141023
ImportĀ upstreamĀ versionĀ 0~git20141023

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
final class AphrontFormPasswordControl extends AphrontFormControl {
 
4
 
 
5
  private $disableAutocomplete;
 
6
 
 
7
  public function setDisableAutocomplete($disable_autocomplete) {
 
8
    $this->disableAutocomplete = $disable_autocomplete;
 
9
    return $this;
 
10
  }
 
11
 
 
12
  protected function getCustomControlClass() {
 
13
    return 'aphront-form-control-password';
 
14
  }
 
15
 
 
16
  protected function renderInput() {
 
17
    return phutil_tag(
 
18
      'input',
 
19
      array(
 
20
        'type'      => 'password',
 
21
        'name'      => $this->getName(),
 
22
        'value'     => $this->getValue(),
 
23
        'disabled'  => $this->getDisabled() ? 'disabled' : null,
 
24
        'autocomplete' => ($this->disableAutocomplete ? 'off' : null),
 
25
        'id'        => $this->getID(),
 
26
      ));
 
27
  }
 
28
 
 
29
}