Skip to content
Snippets Groups Projects
Commit 1aa40e92 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1559 from greezybacon/issue/1479


forms: Properly display staff/user field requirement

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 618f5bc0 0a7f35b6
No related branches found
No related tags found
No related merge requests found
......@@ -429,11 +429,18 @@ class DynamicFormField extends VerySimpleModel {
}
function getField($cache=true) {
global $thisstaff;
if (!$cache)
return new FormField($this->ht);
// Finagle the `required` flag for the FormField instance
$ht = $this->ht;
$ht['required'] = ($thisstaff) ? $this->isRequiredForStaff()
: $this->isRequiredForUsers();
if (!isset($this->_field))
$this->_field = new FormField($this->ht);
$this->_field = new FormField($ht);
return $this->_field;
}
......
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