diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-29 13:57:26 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-29 13:57:26 +0100 |
| commit | 3d94c3dfe203edeb25b42466733672aff9fca89f (patch) | |
| tree | be8aaf92d49b2f825a1da88c847e9c013da2d71a /edit_xref.php | |
| parent | 2fb898ce714e282f5dfca365fe52abc15437f7ef (diff) | |
| download | liberty-3d94c3dfe203edeb25b42466733672aff9fca89f.tar.gz liberty-3d94c3dfe203edeb25b42466733672aff9fca89f.tar.bz2 liberty-3d94c3dfe203edeb25b42466733672aff9fca89f.zip | |
BOM parts list support: xref template dispatch and LibertyXref fixes
- LibertyContent: add getXrefListTemplate(), getXrefRecordTemplate(),
getXrefEditTemplate() for package-aware template dispatch with liberty fallback
- LibertyXref: explicit xorder passthrough in verify(); fix start_date/end_date
to use time() instead of mDb->NOW() so BitDate::date() receives a timestamp
- add_xref.php, edit_xref.php: redirect to getEditUrl() after save/cancel
- list_xref.tpl: use getXrefRecordTemplate() instead of hardcoded liberty path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'edit_xref.php')
| -rw-r--r-- | edit_xref.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/edit_xref.php b/edit_xref.php index 2c14384..b58044a 100644 --- a/edit_xref.php +++ b/edit_xref.php @@ -25,14 +25,14 @@ if( !empty( $_REQUEST['xref_id'] ) ) { } if( !empty( $_REQUEST['fCancel'] ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); + header( 'Location: '.$gContent->getEditUrl() ); die; } if( !empty( $_REQUEST['fSaveXref'] ) ) { $gContent->verifyUpdatePermission(); if( $gContent->storeXref( $_REQUEST ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); + header( 'Location: '.$gContent->getEditUrl() ); die; } $xrefInfo = $_REQUEST; @@ -40,7 +40,7 @@ if( !empty( $_REQUEST['fSaveXref'] ) ) { } elseif( isset( $_REQUEST['expunge'] ) ) { $gContent->verifyExpungePermission(); if( $gContent->stepXref( $_REQUEST ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); + header( 'Location: '.$gContent->getEditUrl() ); die; } $xrefInfo = $gContent->mInfo['xref_store']['data'] ?? []; @@ -53,4 +53,5 @@ $gBitSmarty->assign( 'gContent', $gContent ); $gBitSmarty->assign( 'xrefInfo', $xrefInfo ); $gBitSmarty->assign( 'errors', $gContent->mErrors ); -$gBitSystem->display( 'bitpackage:liberty/edit_xref.tpl', 'Edit Detail', [ 'display_mode' => 'edit' ] ); +$xrefTemplate = $gContent->mInfo['xref_store']['data']['template'] ?? 'text'; +$gBitSystem->display( $gContent->getXrefEditTemplate( $xrefTemplate ), 'Edit Detail', [ 'display_mode' => 'edit' ] ); |
