fix: address code review feedback
- Fix toggle/load_order handlers to use page-reload (not JSON) responses - Remove dead jsonResponse helper method from WorkshopModController - Fix robocopy exit code detection using ROBOCOPY_EXIT: sentinel (not text parsing) - Fix rsync dry-run change detection using RSYNC_EXIT: sentinel - Remove agentIdFromRemote() stub; pass agentId directly to triggerSteamCmdDownload() logging - Fix 'enabled' checkbox default in profile_form to use ($profile['enabled'] ?? 1) - Add missing error_toggle_failed / error_order_failed lang strings Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/dbeebd0e-e7a5-469d-8a8c-e63193d1ebb0 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
8eff063a93
commit
fd860963d1
5 changed files with 59 additions and 46 deletions
|
|
@ -135,7 +135,7 @@ $tplVarNote = $lang['profile_template_vars'] ?? 'Available: {home_id} {agent_id
|
|||
</label>
|
||||
<label class="sw-checkbox">
|
||||
<input type="checkbox" name="enabled" value="1"
|
||||
<?php echo (!isset($profile['enabled']) || !empty($profile['enabled'])) ? 'checked' : ''; ?>>
|
||||
<?php echo ($profile['enabled'] ?? 1) ? 'checked' : ''; ?>>
|
||||
<span><?php echo htmlspecialchars($lang['profile_label_enabled'] ?? 'Profile enabled'); ?></span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -203,14 +203,14 @@ $baseAction = '?m=steam_workshop&p=main';
|
|||
<script>
|
||||
/* Simple toggle / order auto-submit for the mods table */
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// Toggle enable/disable via form submit
|
||||
// Toggle enable/disable: submit the parent form immediately on change
|
||||
document.querySelectorAll('.js-ws-toggle').forEach(function (cb) {
|
||||
cb.addEventListener('change', function () {
|
||||
cb.closest('form').submit();
|
||||
});
|
||||
});
|
||||
|
||||
// Load order auto-submit on blur
|
||||
// Load order: submit on change (blur triggers faster than enter on number inputs)
|
||||
document.querySelectorAll('.js-ws-order').forEach(function (inp) {
|
||||
inp.addEventListener('change', function () {
|
||||
inp.closest('form').submit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue