OLD | NEW |
(Empty) | |
| 1 [# Display a <select> widget with options to set/append/remove/clear the field. |
| 2 Args: |
| 3 arg0: element ID of widget to disable if Clear is selected. The form name a
nd ID |
| 4 of the <select> will be "op_" + arg0. |
| 5 arg1: "multi" for multi-valued fields so that "Append" and "Remove" are offe
red. |
| 6 ] |
| 7 <select name="op_[arg0]" id="op_[arg0]" style="width:9em" tabindex="-1"> |
| 8 [is arg1 "multi"] |
| 9 <option value="append" selected="selected">Append +=</option> |
| 10 <option value="remove">Remove -=</option> |
| 11 [# TODO(jrobbins): <option value="setexact">Set exactly :=</option>] |
| 12 [else] |
| 13 <option value="set" selected="selected">Set =</option> |
| 14 <option value="clear">Clear</option> |
| 15 [end] |
| 16 </select> |
| 17 |
| 18 [is arg1 "multi"][else] |
| 19 <script type="text/javascript" nonce="[nonce]"> |
| 20 runOnLoad(function() { |
| 21 if ($("op_[arg0]")) { |
| 22 $("op_[arg0]").addEventListener("change", function(event) { |
| 23 _ignoreWidgetIfOpIsClear(event.target, '[arg0]'); |
| 24 }); |
| 25 } |
| 26 }); |
| 27 </script> |
| 28 [end] |
OLD | NEW |