Differential D18526 Diff 44493 src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorNotificationsSettingsPanel.php
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | $form = id(new AphrontFormView()) | ||||
'real-time updates.')) | 'real-time updates.')) | ||||
->initBehavior( | ->initBehavior( | ||||
'desktop-notifications-control', | 'desktop-notifications-control', | ||||
$control_config)) | $control_config)) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormSubmitControl()) | id(new AphrontFormSubmitControl()) | ||||
->setValue(pht('Save Preference'))); | ->setValue(pht('Save Preference'))); | ||||
$test_button = id(new PHUIButtonView()) | $button = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIcon('fa-send-o') | |||||
->setWorkflow(true) | ->setWorkflow(true) | ||||
->setText(pht('Send Test Notification')) | ->setText(pht('Send Test Notification')) | ||||
->setHref('/notification/test/') | ->setHref('/notification/test/') | ||||
->setIcon('fa-exclamation-triangle'); | ->setColor(PHUIButtonView::GREY); | ||||
$form_box = id(new PHUIObjectBoxView()) | $form_content = array($saved_box, $status_box, $form); | ||||
->setHeader( | $form_box = $this->newBox( | ||||
id(new PHUIHeaderView()) | pht('Notifications'), $form_content, array($button)); | ||||
->setHeader(pht('Notifications')) | |||||
->addActionLink($test_button)) | |||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | |||||
->appendChild(array( | |||||
$saved_box, | |||||
$status_box, | |||||
$form, | |||||
)); | |||||
$browser_status_box = id(new PHUIInfoView()) | $browser_status_box = id(new PHUIInfoView()) | ||||
->setID($browser_status_id) | ->setID($browser_status_id) | ||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ||||
->setIsHidden(true) | ->setIsHidden(true) | ||||
->appendChild($default_status); | ->appendChild($default_status); | ||||
return array( | return array( | ||||
$form_box, | $form_box, | ||||
$browser_status_box, | $browser_status_box, | ||||
); | ); | ||||
} | } | ||||
} | } |