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

Merge pull request #103 from greezybacon/hotfix/new-ticket-typeahead


Fix slight regression on new ticket by staff

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 9742a3fb aff5badc
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,7 @@ class DynamicForm extends VerySimpleModel {
class UserForm extends DynamicForm {
static $instance;
static $form;
static function objects() {
$os = parent::objects();
......@@ -154,11 +155,17 @@ class UserForm extends DynamicForm {
return $fields;
}
static function getInstance() {
if (!isset(static::$instance)) {
static function getUserForm() {
if (!isset(static::$form)) {
$o = static::objects();
static::$instance = $o[0]->instanciate();
static::$form = $o[0];
}
return static::$form;
}
static function getInstance() {
if (!isset(static::$instance))
static::$instance = static::getForm()->instanciate();
return static::$instance;
}
}
......
......@@ -18,7 +18,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
</thead>
<tbody>
<?php
$uf = UserForm::getInstance();
$uf = UserForm::getUserForm();
$uf->render();
if($cfg->notifyONNewStaffTicket()) { ?>
<tr>
......
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