version 1.327, 2018/07/06 03:18:36
|
version 1.328, 2018/07/06 04:03:31
|
Line 8481 sub initialize_categories {
|
Line 8481 sub initialize_categories {
|
communities => 'Communities', |
communities => 'Communities', |
placement => 'Placement Tests', |
placement => 'Placement Tests', |
); |
); |
my $select0 = ' selected="selected"'; |
my %selnum = ( |
my $select1 = ''; |
instcode => '0', |
|
communities => '1', |
|
placement => '2', |
|
); |
|
my %selected; |
foreach my $default ('instcode','communities','placement') { |
foreach my $default ('instcode','communities','placement') { |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$chgstr = ' onchange="javascript:reorderCats(this.form,'."'','$default"."_pos','0'".');"'; |
$chgstr = ' onchange="javascript:reorderCats(this.form,'."'','$default"."_pos','0'".');"'; |
if (($default eq 'communities') || ($default eq 'placement')) { |
map { $selected{$selnum{$_}} = '' } keys(%selnum); |
$select1 = $select0; |
$selected{$selnum{$default}} = ' selected="selected"'; |
$select0 = ''; |
|
} |
|
$datatable .= '<tr '.$css_class.'><td><span class="LC_nobreak">' |
$datatable .= '<tr '.$css_class.'><td><span class="LC_nobreak">' |
.'<select name="'.$default.'_pos">' |
.'<select name="'.$default.'_pos"'.$chgstr.'>' |
.'<option value="0"'.$select0.'>1</option>' |
.'<option value="0"'.$selected{'0'}.'>1</option>' |
.'<option value="1"'.$select1.'>2</option>' |
.'<option value="1"'.$selected{'1'}.'>2</option>' |
.'<option value="2">3</option></select> ' |
.'<option value="2"'.$selected{'2'}.'>3</option>' |
|
.'<option value="3">4</option></select> ' |
.$default_names{$default} |
.$default_names{$default} |
.'</span></td><td><span class="LC_nobreak">' |
.'</span></td><td><span class="LC_nobreak">' |
.'<label><input type="radio" name="'.$default.'" value="1" checked="checked" />' |
.'<label><input type="radio" name="'.$default.'" value="1" checked="checked" />' |
Line 8509 sub initialize_categories {
|
Line 8512 sub initialize_categories {
|
.'<select name="addcategory_pos"'.$chgstr.'>' |
.'<select name="addcategory_pos"'.$chgstr.'>' |
.'<option value="0">1</option>' |
.'<option value="0">1</option>' |
.'<option value="1">2</option>' |
.'<option value="1">2</option>' |
.'<option value="2" selected="selected">3</option></select> ' |
.'<option value="2">3</option>' |
|
.'<option value="3" selected="selected">4</option></select> ' |
.&mt('Add category').'</span></td><td><span class="LC_nobreak">'.&mt('Name:') |
.&mt('Add category').'</span></td><td><span class="LC_nobreak">'.&mt('Name:') |
.' <input type="text" size="20" name="addcategory_name" value="" /></span>' |
.' <input type="text" size="20" name="addcategory_name" value="" /></span>' |
.'</td></tr>'; |
.'</td></tr>'; |