app/soc/templates/modules/ghop/templatetags/_as_filter_multiselect.html
author Mario Ferraro <fadinlight@gmail.com>
Sun, 25 Oct 2009 19:11:51 +0000
changeset 3040 8f9580309846
parent 2830 5caf0d342696
permissions -rw-r--r--
Integration of general Melange JS utilities in base template.

{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}

<script type="text/javascript">
$(document).ready( function() {
	$('#id_{{ field_label }}').multiSelect({
	  selectAll: false,
	  noneSelected: 'Any',
	  oneOrMoreSelected: '*'
	});
});
</script>

<div class="column">
 <div class="top"><strong>{{ field_label }}:</strong></div>
 <div class="bottom">
  <select id="id_{{ field_label }}" name="{{ field_label }}" 
      multiple="multiple">
   {% for value in field_value %}
   <option value="{{ value }}">{{ value }}</option>
   {% endfor %}
  </select>
 </div>
</div>