From f20f4d2ae2b219b5198d9b810148be867bd02aa8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 29 Jul 2025 21:17:35 +0200 Subject: [PATCH] add method printInlineEditOriginalName() --- views/bootstrap/class.Bootstrap.php | 16 ++++++++++++++++ views/bootstrap4/class.Bootstrap4.php | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 8d6c4f271..b9e3c70e3 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2567,6 +2567,22 @@ $(function() { echo $text; } /* }}} */ + /** + * Wrap text in inline editing tags + * + * @param string text + */ + function printInlineEditOriginalName($text, $object){ /* {{{ */ + if(!empty($this->params['settings']->_inlineEditing)) { + echo "isType('documentcontent')) + echo " data-content=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setoriginalname')."\""; + echo ">".$text; + echo "\n"; + } else + echo $text; + } /* }}} */ + /** * Print button with link for deleting a document * diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 3d253d11d..5f36bbd09 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -2593,6 +2593,22 @@ $(function() { echo $text; } /* }}} */ + /** + * Wrap text in inline editing tags + * + * @param string text + */ + function printInlineEditOriginalName($text, $object){ /* {{{ */ + if(!empty($this->params['settings']->_inlineEditing)) { + echo "isType('documentcontent')) + echo " data-content=\"".$object->getId()."\" data-formtoken=\"".createFormKey('setoriginalname')."\""; + echo ">".$text; + echo "\n"; + } else + echo $text; + } /* }}} */ + /** * Print button with link for deleting a document *