diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-27 18:52:09 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-27 18:52:09 +0100 |
| commit | 163553c308535eabfb66c3c7bd1b38f9e26365b2 (patch) | |
| tree | f600c13f1378f008b5174d317bb466304c46a044 /edit_movement.php | |
| parent | 368b306acf511a0ecd9a8575bf189ffcbdf217ad (diff) | |
| download | stock-163553c308535eabfb66c3c7bd1b38f9e26365b2.tar.gz stock-163553c308535eabfb66c3c7bd1b38f9e26365b2.tar.bz2 stock-163553c308535eabfb66c3c7bd1b38f9e26365b2.zip | |
Redirect to edit page after creating new movement
Saving a new movement now redirects to edit_movement.php?movement_id=X
so the items/upload section is immediately visible. Saving an existing
movement still returns to the list.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'edit_movement.php')
| -rw-r--r-- | edit_movement.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/edit_movement.php b/edit_movement.php index 1173143..719bad7 100644 --- a/edit_movement.php +++ b/edit_movement.php @@ -23,8 +23,13 @@ if( $gContent->isValid() ) { $errors = []; if( !empty( $_REQUEST['save'] ) ) { + $isNew = empty( $_REQUEST['movement_id'] ); if( $gContent->store( $_REQUEST ) ) { - header( 'Location: '.STOCK_PKG_URL.'list_movements.php' ); + if( $isNew ) { + header( 'Location: '.STOCK_PKG_URL.'edit_movement.php?movement_id='.$gContent->mMovementId ); + } else { + header( 'Location: '.STOCK_PKG_URL.'list_movements.php' ); + } die; } $errors = $gContent->mErrors; |
