mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 17:22:42 +01:00
bb9be01d55
Summary: Some more callsites, let me know if you see others, I think think is 98% of them now. Test Plan: tested each page Reviewers: epriestley, btrahan Reviewed By: btrahan CC: Korvin, aran Differential Revision: https://secure.phabricator.com/D6814
43 lines
966 B
PHP
43 lines
966 B
PHP
<?php
|
|
|
|
final class PHUIFormBoxView extends AphrontView {
|
|
|
|
private $headerText;
|
|
private $formError = null;
|
|
private $form;
|
|
|
|
public function setHeaderText($text) {
|
|
$this->headerText = $text;
|
|
return $this;
|
|
}
|
|
|
|
public function setFormError($error) {
|
|
$this->formError = $error;
|
|
return $this;
|
|
}
|
|
|
|
public function setForm($form) {
|
|
$this->form = $form;
|
|
return $this;
|
|
}
|
|
|
|
public function render() {
|
|
|
|
$error = $this->formError ? $this->formError : null;
|
|
|
|
$header = id(new PhabricatorActionHeaderView())
|
|
->setHeaderTitle($this->headerText)
|
|
->setHeaderColor(PhabricatorActionHeaderView::HEADER_LIGHTBLUE);
|
|
|
|
$content = id(new PHUIBoxView())
|
|
->appendChild(array($header, $error, $this->form))
|
|
->setBorder(true)
|
|
->addMargin(PHUI::MARGIN_LARGE_TOP)
|
|
->addMargin(PHUI::MARGIN_LARGE_LEFT)
|
|
->addMargin(PHUI::MARGIN_LARGE_RIGHT)
|
|
->addClass('phui-form-box');
|
|
|
|
return $content;
|
|
|
|
}
|
|
}
|