Differential D7914 Diff 17922 src/applications/differential/controller/DifferentialDiffCreateController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialDiffCreateController.php
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | $form | ||||
->setError($e_file)) | ->setError($e_file)) | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormSubmitControl()) | id(new AphrontFormSubmitControl()) | ||||
->addCancelButton($cancel_uri) | ->addCancelButton($cancel_uri) | ||||
->setValue(pht("Create Diff"))); | ->setValue(pht("Create Diff"))); | ||||
$form_box = id(new PHUIObjectBoxView()) | $form_box = id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('Create New Diff')) | ->setHeaderText(pht('Create New Diff')) | ||||
->setFormError($errors) | |||||
->setForm($form); | ->setForm($form); | ||||
$crumbs = $this->buildApplicationCrumbs(); | |||||
$crumbs->addTextCrumb(pht('Create Diff')); | |||||
if ($errors) { | if ($errors) { | ||||
$errors = id(new AphrontErrorView()) | $error_view = id(new AphrontErrorView()) | ||||
->setErrors($errors); | ->setSeverity(AphrontErrorView::SEVERITY_ERROR) | ||||
->appendChild($errors); | |||||
$form_box->setFormError($error_view); | |||||
} | } | ||||
$crumbs = $this->buildApplicationCrumbs(); | |||||
$crumbs->addTextCrumb(pht('Create Diff')); | |||||
return $this->buildApplicationPage( | return $this->buildApplicationPage( | ||||
array( | array( | ||||
$crumbs, | $crumbs, | ||||
$form_box, | $form_box, | ||||
), | ), | ||||
array( | array( | ||||
'title' => pht('Create Diff'), | 'title' => pht('Create Diff'), | ||||
'device' => true, | 'device' => true, | ||||
)); | )); | ||||
} | } | ||||
} | } |