Remove Travis CI badge and improve dropdown selection handling

1. Removed broken Travis CI build status badge from README header

2. Enhanced dropdown selection on messages page:
   - Added explicit JavaScript change event handler
   - Added CSS to ensure proper text color and background
   - Added blur/focus to force visual update after selection
   - Added console logging for debugging

This should resolve the issue where selected recipient names weren't
displaying properly in the dropdown after selection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ken Johnson
2025-12-09 14:59:07 +00:00
parent a477b783e8
commit 65e42ceee3
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# RailsGoat [![Build Status](https://api.travis-ci.org/OWASP/railsgoat.png?branch=master)](https://travis-ci.org/OWASP/railsgoat) # RailsGoat
RailsGoat is a vulnerable version of the Ruby on Rails Framework from versions 3 to 6. It includes vulnerabilities from the OWASP Top 10, as well as some "extras" that the initial project contributors felt worthwhile to share. This project is designed to educate both developers, as well as security professionals. RailsGoat is a vulnerable version of the Ruby on Rails Framework from versions 3 to 6. It includes vulnerabilities from the OWASP Top 10, as well as some "extras" that the initial project contributors felt worthwhile to share. This project is designed to educate both developers, as well as security professionals.
+23
View File
@@ -158,6 +158,14 @@ $(document).on('turbolinks:load', function() {
makeActive(); makeActive();
}); });
// Explicitly handle dropdown selection to ensure display updates
$('#message_receiver_id').on('change', function() {
var selectedText = $(this).find('option:selected').text();
console.log('Selected recipient:', selectedText);
// Force a visual update
$(this).blur().focus();
});
// Form submission with AJAX // Form submission with AJAX
$("#submit_button").click(function(event) { $("#submit_button").click(function(event) {
event.preventDefault(); event.preventDefault();
@@ -306,4 +314,19 @@ $("#submit_button").click(function(event) {
justify-content: center; justify-content: center;
} }
} }
/* Ensure dropdown displays selected value properly */
#message_receiver_id {
color: #212529;
background-color: #fff;
}
#message_receiver_id option {
color: #212529;
}
#message_receiver_id:focus {
border-color: var(--rg-success);
box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1);
}
</style> </style>