[Trac-tickets] Re: [The Trac Project] #2063: Please use attribute 'value' instead of content in select options

The Trac Project noreply at edgewall.com
Wed Sep 14 08:14:52 CDT 2005


#2063: Please use attribute 'value' instead of content in select options
---------------------------+------------------------------------------------
 Reporter:  vyt at vzljot.ru  |        Owner:  jonas
     Type:  defect         |       Status:  new  
 Priority:  normal         |    Milestone:       
Component:  general        |      Version:  devel
 Severity:  normal         |   Resolution:       
 Keywords:                 |  
---------------------------+------------------------------------------------
Comment (by vyt at vzljot.ru):

 I customize possibility for css selection based on ticket type value, and
 make easily customization for translation. My macros.cs uses:
 {{{
  <select size="1" id="<?cs var:name ?>" name="<?cs var:name ?>"><?cs
   if:optional ?><option></option><?cs /if ?><?cs
   each:option = options ?>
    <option<?cs if:option == selected ?> selected="selected"<?cs /if ?>
 value="<?cs
      var:option ?>"><?cs if:option == 'defect' ?>defect in Russian<?cs
      elif:option == 'enhancement' ?>Russian enhancement<?cs
      elif:option == 'task' ?>Russian task<?cs
      else ?><?cs var:option ?><?cs /if ?></option><?cs
   /each ?>
  </select>
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2063>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list