Skip to content
Snippets Groups Projects
Commit 62798159 authored by Jared Hancock's avatar Jared Hancock
Browse files

Fix keeping selection value in a selection field

Previously, the value of the selection was lost in the request and, if the
form field was marked as required, then a ticket could never be submitted.
parent 6e8033b6
No related branches found
No related tags found
No related merge requests found
...@@ -708,6 +708,8 @@ class DynamicListItem extends VerySimpleModel { ...@@ -708,6 +708,8 @@ class DynamicListItem extends VerySimpleModel {
} }
class SelectionField extends FormField { class SelectionField extends FormField {
static $widget = 'SelectionWidget';
function getListId() { function getListId() {
list(,$list_id) = explode('-', $this->get('type')); list(,$list_id) = explode('-', $this->get('type'));
return $list_id; return $list_id;
...@@ -719,10 +721,6 @@ class SelectionField extends FormField { ...@@ -719,10 +721,6 @@ class SelectionField extends FormField {
return $this->_list; return $this->_list;
} }
function getWidget() {
return new SelectionWidget($this);
}
function parse($value) { function parse($value) {
return $this->to_php($value); return $this->to_php($value);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment