From 46b1e32057b0807a74613c697775396f138ed841 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Wed, 2 Dec 2015 08:56:21 +0000
Subject: [PATCH] forms: Field Editable Property

Add internal editable property used by internal forms to control of a field
is editable or not. This is not to be confused with form field properties
which are meant for general forms.
---
 include/class.forms.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/class.forms.php b/include/class.forms.php
index d64220956..46d55c2d9 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -702,6 +702,10 @@ class FormField {
 
     function isEditable($user=null) {
 
+        // Internal editable flag used by internal forms e.g internal lists
+        if (!$user && isset($this->ht['editable']))
+            return $this->ht['editable'];
+
         if ($user instanceof Staff)
             $flag = DynamicFormField::FLAG_AGENT_EDIT;
         else
-- 
GitLab