Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/controller/ManiphestTaskEditController.php
| Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
| } | } | ||||
| $errors = array(); | $errors = array(); | ||||
| $e_title = true; | $e_title = true; | ||||
| $field_list = PhabricatorCustomField::getObjectFields( | $field_list = PhabricatorCustomField::getObjectFields( | ||||
| $task, | $task, | ||||
| PhabricatorCustomField::ROLE_EDIT); | PhabricatorCustomField::ROLE_EDIT); | ||||
| $field_list->setViewer($user); | |||||
| foreach ($field_list->getFields() as $field) { | foreach ($field_list->getFields() as $field) { | ||||
| $field->setObject($task); | $field->setObject($task); | ||||
| $field->setViewer($user); | |||||
| } | } | ||||
| $field_list->readFieldsFromStorage($task); | $field_list->readFieldsFromStorage($task); | ||||
| $aux_fields = $field_list->getFields(); | $aux_fields = $field_list->getFields(); | ||||
| if ($request->isFormPost()) { | if ($request->isFormPost()) { | ||||
| $changes = array(); | $changes = array(); | ||||
| ▲ Show 20 Lines • Show All 400 Lines • ▼ Show 20 Lines | if ($can_edit_projects) { | ||||
| 'href' => '/project/create/', | 'href' => '/project/create/', | ||||
| 'mustcapture' => true, | 'mustcapture' => true, | ||||
| 'sigil' => 'project-create', | 'sigil' => 'project-create', | ||||
| ), | ), | ||||
| pht('Create New Project'))) | pht('Create New Project'))) | ||||
| ->setDatasource('/typeahead/common/projects/')); | ->setDatasource('/typeahead/common/projects/')); | ||||
| } | } | ||||
| foreach ($aux_fields as $aux_field) { | $field_list->appendFieldsToForm($form); | ||||
| $aux_control = $aux_field->renderEditControl(); | |||||
| $form->appendChild($aux_control); | |||||
| } | |||||
| require_celerity_resource('aphront-error-view-css'); | require_celerity_resource('aphront-error-view-css'); | ||||
| Javelin::initBehavior('project-create', array( | Javelin::initBehavior('project-create', array( | ||||
| 'tokenizerID' => $project_tokenizer_id, | 'tokenizerID' => $project_tokenizer_id, | ||||
| )); | )); | ||||
| if ($files) { | if ($files) { | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||