protected function fetchFieldValue(Tracker_FormElement_Field_List_Value $value, $name, $is_selected) { if ($value->getId() == Tracker_FormElement_Field_List_Bind_StaticValue_None::VALUE_ID) { return ''; } $id = $value->getId(); $html = ''; $checked = $is_selected ? 'checked="checked"' : ''; $html .= '<label class="checkbox" for="cb_' . $id . '" ><input type="hidden" ' . $name . ' value="0" />'; $html .= '<input type="checkbox" ' . $name . ' value="' . $id . '" id=cb_' . $id . ' ' . $checked . ' valign="middle" />'; $html .= $this->getBind()->formatChangesetValueWithoutLink($value) . '</label>'; return $html; }
protected function fetchFieldValue(Tracker_FormElement_Field_List_Value $value, $name, $is_selected) { if ($value->getId() == Tracker_FormElement_Field_List_Bind_StaticValue_None::VALUE_ID) { if ($this->isRequired()) { return ''; } $is_selected = true; //Hackalert: "None" selected by default. Overrided when other value is selected } $label = $this->getBind()->formatChangesetValueWithoutLink($value); if (!$name) { $name = 'name="admin"'; } $id = $value->getId(); $html = ''; $checked = $is_selected ? 'checked="checked"' : ''; $html .= '<div class="val_' . $id . '">'; $html .= ' <label class="radio" for="rb_' . $id . '" >'; $html .= ' <input type="radio" ' . $name . ' value="' . $id . '" id=rb_' . $id . ' ' . $checked . ' valign="middle" />'; $html .= ' ' . $label . '</label>'; $html .= '</div>'; return $html; }
private function fetchAdminEditRowNotModifiable(Tracker_FormElement_Field_List_Value $v) { $html = ''; $html .= '<tr valign="top" class="' . ($v->isHidden() ? 'tracker_admin_static_value_hidden' : '') . '">'; $html .= '<td>' . $this->formatChangesetValue(array('id' => $v->getId())) . '</td>'; $html .= '</tr>'; return $html; }
protected function fetchFieldValue(Tracker_FormElement_Field_List_Value $value, $name, $is_selected) { $id = $value->getId(); if ($id == Tracker_FormElement_Field_List_Bind_StaticValue_None::VALUE_ID) { $label = $value->getLabel(); } else { $label = $this->getBind()->formatArtifactValue($id); } $style = $this->getBind()->getSelectOptionInlineStyle($id); $selected = $is_selected ? 'selected="selected"' : ''; return '<option value="' . $id . '" ' . $selected . ' title="' . $label . '" style="' . $style . '">' . $label . '</option>'; }
protected function getRESTBindValue(Tracker_FormElement_Field_List_Value $value) { $class_with_right_namespace = '\\Tuleap\\Tracker\\REST\\FieldValueRepresentation'; $representation = new $class_with_right_namespace(); $values = array(self::SOAP_ID_KEY => $value->getId(), self::SOAP_LABEL_KEY => $value->getSoapValue()); $representation->build($values); return $representation; }
public function getFullRESTValue(Tracker_FormElement_Field_List_Value $value) { return array('label' => $value->getLabel(), 'id' => $value->getId()); }
public function getValueId() { return $this->value->getId(); }
protected function getRESTBindValue(Tracker_FormElement_Field_List_Value $value) { return intval($value->getId()); }