mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 01:48:23 +01:00
Normalize renderControl API
Summary: Make Maniphest use the standard API, `renderEditControl`. Removes custom method `renderControl`. Test Plan: Created/edited tasks with custom fields. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7034
This commit is contained in:
parent
45ff6077a7
commit
30159d9ad9
4 changed files with 3 additions and 11 deletions
|
@ -108,7 +108,7 @@ class ManiphestAuxiliaryFieldDefaultSpecification
|
||||||
return $this->checkboxValue;
|
return $this->checkboxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderControl() {
|
public function renderEditControl() {
|
||||||
$control = null;
|
$control = null;
|
||||||
|
|
||||||
$type = $this->getFieldType();
|
$type = $this->getFieldType();
|
||||||
|
@ -223,7 +223,7 @@ class ManiphestAuxiliaryFieldDefaultSpecification
|
||||||
$type = $this->getFieldType();
|
$type = $this->getFieldType();
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case self::TYPE_DATE:
|
case self::TYPE_DATE:
|
||||||
$control = $this->renderControl();
|
$control = $this->renderEditControl();
|
||||||
$value = $control->readValueFromRequest($request);
|
$value = $control->readValueFromRequest($request);
|
||||||
break;
|
break;
|
||||||
case self::TYPE_USER:
|
case self::TYPE_USER:
|
||||||
|
|
|
@ -80,10 +80,6 @@ abstract class ManiphestAuxiliaryFieldSpecification
|
||||||
return $this->type;
|
return $this->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderControl() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderForDetailView() {
|
public function renderForDetailView() {
|
||||||
return $this->getValue();
|
return $this->getValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,7 +496,7 @@ final class ManiphestTaskEditController extends ManiphestController {
|
||||||
$aux_field->setError(true);
|
$aux_field->setError(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$aux_control = $aux_field->renderControl();
|
$aux_control = $aux_field->renderEditControl();
|
||||||
$form->appendChild($aux_control);
|
$form->appendChild($aux_control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,6 @@ abstract class ManiphestCustomField
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderControl() {
|
|
||||||
return $this->renderEditControl();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function validate() {
|
public function validate() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue