Add cancel/back options to all user input prompts

Changes:
- Added "0) Cancel" option to all menu prompts
- Added "(or 0 to cancel)" to all text input prompts
- Ensures users can back out of any operation at any time
- Scripts affected:
  - website-error-analyzer.sh (scope selection, time range)
  - 500-error-tracker.sh (time range selection)
  - wordpress-cron-manager.sh (all domain/user input prompts, status checks)

User Experience Improvements:
- No more being trapped in prompts
- Clear cancel instructions on every input
- Consistent "Operation cancelled" messaging
- Proper exit codes (0 for user cancellation)

Tested:
✓ website-error-analyzer.sh - cancel on scope selection
✓ 500-error-tracker.sh - cancel on time selection
✓ wordpress-cron-manager.sh - cancel on domain/user input
✓ All cancellations return cleanly to menu

https://claude.com/claude-code
This commit is contained in:
cschantz
2025-11-07 17:42:11 -05:00
parent 4e169f2c4d
commit 253bdc4229
3 changed files with 69 additions and 22 deletions
+7
View File
@@ -26,11 +26,18 @@ echo -e "${CYAN}How far back to scan?${NC}"
echo " 1) Last 24 hours (default)"
echo " 2) Last 7 days"
echo " 3) Last 30 days"
echo " 0) Cancel and return to menu"
echo ""
read -p "Select option [1]: " time_choice
time_choice=${time_choice:-1}
case $time_choice in
0)
echo ""
echo "Scan cancelled."
echo ""
exit 0
;;
1) HOURS_TO_SCAN=24 ;;
2) HOURS_TO_SCAN=168 ;;
3) HOURS_TO_SCAN=720 ;;