Differential D20034 Diff 47862 src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | foreach ($factors as $factor) { | ||||
$status = $provider->newStatus(); | $status = $provider->newStatus(); | ||||
$status_icon = $status->getFactorIcon(); | $status_icon = $status->getFactorIcon(); | ||||
$status_color = $status->getFactorColor(); | $status_color = $status->getFactorColor(); | ||||
$icon = id(new PHUIIconView()) | $icon = id(new PHUIIconView()) | ||||
->setIcon("{$status_icon} {$status_color}") | ->setIcon("{$status_icon} {$status_color}") | ||||
->setTooltip(pht('Provider: %s', $status->getName())); | ->setTooltip(pht('Provider: %s', $status->getName())); | ||||
$details = $provider->getConfigurationListDetails($factor, $viewer); | |||||
$rows[] = array( | $rows[] = array( | ||||
$icon, | $icon, | ||||
javelin_tag( | javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $this->getPanelURI('?edit='.$factor->getID()), | 'href' => $this->getPanelURI('?edit='.$factor->getID()), | ||||
'sigil' => 'workflow', | 'sigil' => 'workflow', | ||||
), | ), | ||||
$factor->getFactorName()), | $factor->getFactorName()), | ||||
$provider->getFactor()->getFactorShortName(), | |||||
$provider->getDisplayName(), | $provider->getDisplayName(), | ||||
$details, | |||||
phabricator_datetime($factor->getDateCreated(), $viewer), | phabricator_datetime($factor->getDateCreated(), $viewer), | ||||
javelin_tag( | javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $this->getPanelURI('?delete='.$factor->getID()), | 'href' => $this->getPanelURI('?delete='.$factor->getID()), | ||||
'sigil' => 'workflow', | 'sigil' => 'workflow', | ||||
'class' => 'small button button-grey', | 'class' => 'small button button-grey', | ||||
), | ), | ||||
pht('Remove')), | pht('Remove')), | ||||
); | ); | ||||
} | } | ||||
$table = new AphrontTableView($rows); | $table = new AphrontTableView($rows); | ||||
$table->setNoDataString( | $table->setNoDataString( | ||||
pht("You haven't added any authentication factors to your account yet.")); | pht("You haven't added any authentication factors to your account yet.")); | ||||
$table->setHeaders( | $table->setHeaders( | ||||
array( | array( | ||||
null, | null, | ||||
pht('Name'), | pht('Name'), | ||||
pht('Type'), | pht('Type'), | ||||
pht('Provider'), | |||||
pht('Details'), | |||||
pht('Created'), | pht('Created'), | ||||
null, | null, | ||||
)); | )); | ||||
$table->setColumnClasses( | $table->setColumnClasses( | ||||
array( | array( | ||||
null, | null, | ||||
'wide pri', | 'wide pri', | ||||
null, | null, | ||||
null, | |||||
null, | |||||
'right', | 'right', | ||||
'action', | 'action', | ||||
)); | )); | ||||
$table->setRowClasses($rowc); | $table->setRowClasses($rowc); | ||||
$table->setDeviceVisibility( | $table->setDeviceVisibility( | ||||
array( | array( | ||||
true, | true, | ||||
true, | true, | ||||
false, | false, | ||||
false, | false, | ||||
false, | |||||
false, | |||||
true, | true, | ||||
)); | )); | ||||
$help_uri = PhabricatorEnv::getDoclink( | $help_uri = PhabricatorEnv::getDoclink( | ||||
'User Guide: Multi-Factor Authentication'); | 'User Guide: Multi-Factor Authentication'); | ||||
$buttons = array(); | $buttons = array(); | ||||
▲ Show 20 Lines • Show All 320 Lines • Show Last 20 Lines |