mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 06:50:55 +01:00
Update Macro Audio edit page for new UI
Summary: Updates Macro Audit Edit page with new UI and newPage Test Plan: Edit Audio on macro, see new layout, save file. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15598
This commit is contained in:
parent
7694a6729f
commit
867c699fee
1 changed files with 18 additions and 11 deletions
|
@ -104,20 +104,19 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController {
|
||||||
'Best for ambient sounds.'));
|
'Best for ambient sounds.'));
|
||||||
|
|
||||||
$form->appendChild($options);
|
$form->appendChild($options);
|
||||||
|
$form->appendChild(
|
||||||
$form
|
|
||||||
->appendChild(
|
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue(pht('Save Audio Behavior'))
|
->setValue(pht('Save Audio Behavior'))
|
||||||
->addCancelButton($view_uri));
|
->addCancelButton($view_uri));
|
||||||
|
|
||||||
$crumbs = $this->buildApplicationCrumbs();
|
$crumbs = $this->buildApplicationCrumbs();
|
||||||
|
|
||||||
$title = pht('Edit Audio Behavior');
|
$title = pht('Edit Audio: %s', $macro->getName());
|
||||||
$crumb = pht('Edit Audio');
|
$crumb = pht('Edit Audio');
|
||||||
|
|
||||||
$crumbs->addTextCrumb(pht('Macro "%s"', $macro->getName()), $view_uri);
|
$crumbs->addTextCrumb(pht('Macro "%s"', $macro->getName()), $view_uri);
|
||||||
$crumbs->addTextCrumb($crumb, $request->getRequestURI());
|
$crumbs->addTextCrumb($crumb, $request->getRequestURI());
|
||||||
|
$crumbs->setBorder(true);
|
||||||
|
|
||||||
$upload_form = id(new AphrontFormView())
|
$upload_form = id(new AphrontFormView())
|
||||||
->setEncType('multipart/form-data')
|
->setEncType('multipart/form-data')
|
||||||
|
@ -132,22 +131,30 @@ final class PhabricatorMacroAudioController extends PhabricatorMacroController {
|
||||||
|
|
||||||
$upload = id(new PHUIObjectBoxView())
|
$upload = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText(pht('Upload New Audio'))
|
->setHeaderText(pht('Upload New Audio'))
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($upload_form);
|
->setForm($upload_form);
|
||||||
|
|
||||||
$form_box = id(new PHUIObjectBoxView())
|
$form_box = id(new PHUIObjectBoxView())
|
||||||
->setHeaderText($title)
|
->setHeaderText(pht('Behavior'))
|
||||||
->setFormErrors($errors)
|
->setFormErrors($errors)
|
||||||
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setForm($form);
|
->setForm($form);
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
$header = id(new PHUIHeaderView())
|
||||||
array(
|
->setHeader($title)
|
||||||
$crumbs,
|
->setHeaderIcon('fa-pencil');
|
||||||
|
|
||||||
|
$view = id(new PHUITwoColumnView())
|
||||||
|
->setHeader($header)
|
||||||
|
->setFooter(array(
|
||||||
$form_box,
|
$form_box,
|
||||||
$upload,
|
$upload,
|
||||||
),
|
|
||||||
array(
|
|
||||||
'title' => $title,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
return $this->newPage()
|
||||||
|
->setTitle($title)
|
||||||
|
->setCrumbs($crumbs)
|
||||||
|
->appendChild($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue