| 1 |
jQuery(document).ready(function($) { |
| 2 |
// languages form |
| 3 |
// fills the fields based on the language dropdown list choice |
| 4 |
$('#lang_list').change(function() { |
| 5 |
value = $(this).attr('value').split('-'); |
| 6 |
selected = $("select option:selected").text().split(' - '); |
| 7 |
$('input[name="slug"]').val(value[0]); |
| 8 |
$('input[name="description"]').val(value[1]); |
| 9 |
$('input[name="rtl"]').val([value[2]]); |
| 10 |
$('input[name="name"]').val(selected[0]); |
| 11 |
}); |
| 12 |
}); |
| 13 |
|