Differential D18562 Diff 44577 src/applications/people/controller/PhabricatorPeopleNewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/controller/PhabricatorPeopleNewController.php
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$form = id(new AphrontFormView()) | $form = id(new AphrontFormView()) | ||||
->setUser($admin); | ->setUser($admin); | ||||
if ($is_bot) { | if ($is_bot) { | ||||
$title = pht('Create New Bot'); | |||||
$form->appendRemarkupInstructions( | $form->appendRemarkupInstructions( | ||||
pht('You are creating a new **bot** user account.')); | pht('You are creating a new **bot** user account.')); | ||||
} else if ($is_list) { | } else if ($is_list) { | ||||
$title = pht('Create New Mailing List'); | |||||
$form->appendRemarkupInstructions( | $form->appendRemarkupInstructions( | ||||
pht('You are creating a new **mailing list** user account.')); | pht('You are creating a new **mailing list** user account.')); | ||||
} else { | } else { | ||||
$title = pht('Create New User'); | |||||
$form->appendRemarkupInstructions( | $form->appendRemarkupInstructions( | ||||
pht('You are creating a new **standard** user account.')); | pht('You are creating a new **standard** user account.')); | ||||
} | } | ||||
$form | $form | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
->setLabel(pht('Username')) | ->setLabel(pht('Username')) | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | if ($is_bot) { | ||||
" having an email address.\n". | " having an email address.\n". | ||||
"\n\n". | "\n\n". | ||||
"The address will automatically be verified, so you do not need ". | "The address will automatically be verified, so you do not need ". | ||||
"to be able to receive mail at this address, and can enter some ". | "to be able to receive mail at this address, and can enter some ". | ||||
"invalid or nonexistent (but correctly formatted) address like ". | "invalid or nonexistent (but correctly formatted) address like ". | ||||
"`bot@yourcompany.com` if you prefer.")); | "`bot@yourcompany.com` if you prefer.")); | ||||
} | } | ||||
$title = pht('Create New User'); | |||||
$box = id(new PHUIObjectBoxView()) | $box = id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('User')) | ->setHeaderText($title) | ||||
->setFormErrors($errors) | ->setFormErrors($errors) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) | ||||
->setForm($form); | ->setForm($form); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$crumbs->addTextCrumb($title); | $crumbs->addTextCrumb($title); | ||||
$crumbs->setBorder(true); | $crumbs->setBorder(true); | ||||
$header = id(new PHUIHeaderView()) | |||||
->setHeader($title) | |||||
->setHeaderIcon('fa-user'); | |||||
$view = id(new PHUITwoColumnView()) | $view = id(new PHUITwoColumnView()) | ||||
->setHeader($header) | |||||
->setFooter($box); | ->setFooter($box); | ||||
return $this->newPage() | return $this->newPage() | ||||
->setTitle($title) | ->setTitle($title) | ||||
->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
->appendChild($view); | ->appendChild($view); | ||||
} | } | ||||
} | } |