From 188ec7c0240e15f68d5c2862550bc38e3c42eb67 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 22 Nov 2013 10:45:58 -0600
Subject: [PATCH] forms: Fix oops allowing change of thread entry type

---
 include/staff/dynamic-form.inc.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php
index 26a30ae5b..7d1a19fe4 100644
--- a/include/staff/dynamic-form.inc.php
+++ b/include/staff/dynamic-form.inc.php
@@ -106,6 +106,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         $force_name = $f->isNameForced() ? 'disabled="disabled"' : '';
         $force_privacy = $f->isPrivacyForced() ? 'disabled="disabled"' : '';
         $force_required = $f->isRequirementForced() ? 'disabled="disabled"' : '';
+        $fi = $f->getImpl();
         $errors = $f->errors(); ?>
         <tr>
             <td><i class="icon-sort"></i></td>
@@ -115,7 +116,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                     if ($errors['label']) echo '<br/>'; echo $errors['label']; ?>
             </td>
             <td><select name="type-<?php echo $id; ?>" <?php
-                if (!$f->isChangeable()) echo 'disabled="disabled"'; ?>>
+                if (!$fi->isChangeable()) echo 'disabled="disabled"'; ?>>
                 <?php foreach (FormField::allTypes() as $group=>$types) {
                         ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php
                         foreach ($types as $type=>$nfo) {
-- 
GitLab