diff --git a/include/class.dynamic_forms.php b/include/class.dynamic_forms.php index e40e037f6f99409981204c942d7040432d4a5909..95d8712db5f81a3e4be295b01bbec6e05a6b9948 100644 --- a/include/class.dynamic_forms.php +++ b/include/class.dynamic_forms.php @@ -54,10 +54,13 @@ class DynamicForm extends VerySimpleModel { } function getDynamicFields() { - if (!isset($this->_dfields)) + if (!isset($this->_dfields)) { $this->_dfields = DynamicFormField::objects() ->filter(array('form_id'=>$this->id)) ->all(); + foreach ($this->_dfields as $f) + $f->setForm($this); + } return $this->_dfields; } diff --git a/include/class.forms.php b/include/class.forms.php index 6e6537bf0b6fc8b4a95decf8842bf09dfcdf8bd5..71a27a087f8d7b7b444bd541ea3f779ce15beef6 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -798,6 +798,10 @@ class PriorityField extends ChoiceField { function hasIdValue() { return true; } + function isChangeable() { + return $this->getForm()->get('type') != 'T' || + $this->get('name') != 'priority'; + } function getChoices() { global $cfg;