Modify ↓
      
        Opened 16 years ago
Last modified 16 years ago
#6735 new defect
Use field label insted of field id in required error
| Reported by: | okamototk | Owned by: | obs | 
|---|---|---|---|
| Priority: | normal | Component: | TicketSubmitPolicyPlugin | 
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 | 
Description
Currently filed id is used in required error message. Use filed label seems better for user like this:
--- ../0.11/ticketsubmitpolicy/htdocs/js/requires.js    2010-02-27 06:15:30.0000
00000 +0900
+++ ticketsubmitpolicy/htdocs/js/requires.js    2010-02-27 06:58:20.000000000 +0
900
@@ -4,22 +4,24 @@
         for ( var i=0; i != requiredfields.length; i++ ) {
             var field=$("#field-" + requiredfields[i]).val();
             if (!field) {
-                missing.push(requiredfields[i]);
+                field_label = $("#properties label[for='field-"+requiredfields[
i]+"']").html();
+                field_label = field_label.substring(0, field_label.length-1);
+                missing.push(field_label);
             }
         }
regards,
Takashi Okamoto
Attachments (0)
Note: See
        TracTickets for help on using
        tickets.
    

