# HG changeset patch # User Paul Boddie # Date 1360435837 -3600 # Node ID 603adb24b5299904aadfd52d0ac3f444447e4e48 # Parent ca45b0260329a3508965c52d62e69097aec9d3c5 Tidied up the output for messages not connected with the current request. Improved the select/option output. diff -r ca45b0260329 -r 603adb24b529 macros/FormField.py --- a/macros/FormField.py Sat Feb 09 15:56:04 2013 +0100 +++ b/macros/FormField.py Sat Feb 09 19:50:37 2013 +0100 @@ -134,7 +134,7 @@ is_selected = maxselected == 1 and option == value or maxselected != 1 and option in values output.append(fmt.rawHTML('' % ( - escattr(option), is_selected and "selected" or "", escape(label)) + escattr(option), is_selected and 'selected="selected"' or "", escape(label)) )) output.append(fmt.rawHTML('')) diff -r ca45b0260329 -r 603adb24b529 macros/FormMessage.py --- a/macros/FormMessage.py Sat Feb 09 15:56:04 2013 +0100 +++ b/macros/FormMessage.py Sat Feb 09 19:50:37 2013 +0100 @@ -75,13 +75,13 @@ # Exclude values intended for other forms. if fragment and form_fragment != fragment or not fragment and form_fragment: - value = "" - else: - value = form.get(ref, [""])[index and int(index) or 0] + return "" # Render the message. - return fmt.text(value) + else: + value = form.get(ref, [""])[index and int(index) or 0] + return fmt.text(value) def showError(text, request): fmt = request.formatter