summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-14 17:01:03 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-14 17:01:03 +0100
commit68d6d45635a040a5004581afc5ae78db729175d7 (patch)
tree4950ebcdd235962f848f02d8792ae52713b55bdc
parent97db6f79021ad3f9f35cfa4db670bbd061ff4195 (diff)
downloadstock-68d6d45635a040a5004581afc5ae78db729175d7.tar.gz
stock-68d6d45635a040a5004581afc5ae78db729175d7.tar.bz2
stock-68d6d45635a040a5004581afc5ae78db729175d7.zip
Fix CKEditor integration in edit_assembly and edit_stgrp_item
- edit_assembly.tpl: replace plain <textarea> with {textarea} plugin; omit id (defaults to LIBERTY_TEXT_AREA for CKEditor); rows=10 - edit_stgrp_item.tpl: remove double form-group wrapper; pass label directly to {textarea}; remove name='data' (use default 'edit') - edit_stgrp_item.php: read $_POST['edit'] not $_POST['data'] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--edit_stgrp_item.php2
-rwxr-xr-xtemplates/edit_assembly.tpl7
-rw-r--r--templates/edit_stgrp_item.tpl7
3 files changed, 3 insertions, 13 deletions
diff --git a/edit_stgrp_item.php b/edit_stgrp_item.php
index 27066cc..406d192 100644
--- a/edit_stgrp_item.php
+++ b/edit_stgrp_item.php
@@ -35,7 +35,7 @@ if( !$row ) {
$errors = [];
if( !empty( $_POST['fSave'] ) ) {
- $data = trim( $_POST['data'] ?? '' ) ?: null;
+ $data = trim( $_POST['edit'] ?? '' ) ?: null;
$gBitDb->query(
"UPDATE `{$X}liberty_xref_item` SET `data` = ?
WHERE `item` = ? AND `x_group` = 'stgrp' AND `content_type_guid` = 'stock'",
diff --git a/templates/edit_assembly.tpl b/templates/edit_assembly.tpl
index 0ce31a4..a20b1e8 100755
--- a/templates/edit_assembly.tpl
+++ b/templates/edit_assembly.tpl
@@ -30,12 +30,7 @@
{/forminput}
</div>
- <div class="form-group">
- {formlabel label="Description" for="assembly-desc"}
- {forminput}
- <textarea name="edit" id="assembly-desc" rows="4" cols="50">{$gContent->mInfo.data|default:''|escape}</textarea>
- {/forminput}
- </div>
+ {textarea edit=$gContent->mInfo.data name="edit" rows=10 label="Description"}
{if $gXrefInfo->mGroups}
{jstabs}
diff --git a/templates/edit_stgrp_item.tpl b/templates/edit_stgrp_item.tpl
index 404de02..d63a61c 100644
--- a/templates/edit_stgrp_item.tpl
+++ b/templates/edit_stgrp_item.tpl
@@ -12,12 +12,7 @@
{form}
<input type="hidden" name="item" value="{$stgrpItem.item|escape}"/>
- <div class="form-group">
- {formlabel label="Description" for="editliberty"}
- {forminput}
- {textarea edit=$stgrpItem.data name='data' rows=10}
- {/forminput}
- </div>
+ {textarea edit=$stgrpItem.data rows=10 label="Description"}
<div class="form-group submit">
<input type="submit" class="btn btn-default" name="fCancel" value="{tr}Cancel{/tr}"/>