Syslinux config: replace checkbox with radio button

This commit is contained in:
bergware
2019-01-29 09:48:12 +01:00
parent 05aaf4a3ce
commit 03910ecf84
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -40,15 +40,15 @@ switch ($display['theme']) {
case 'gray':
case 'azure':
echo "span.array,span.system{margin-left:33.33%;width:65.5%;padding:2px 10px;font-weight:bold;border:solid 1px #606E7F;border-bottom:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;resize:none;border-top:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;border-top:none}\n";
break;
case 'white':
echo "span.array,span.system{margin-left:33.33%;width:65.5%;padding:2px 10px;font-weight:bold;border:solid 1px #1c1c1c;border-bottom:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;resize:none;border:1px solid #1c1b1b;border-top:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;border:1px solid #1c1b1b;border-top:none}\n";
break;
case 'black':
echo "span.array,span.system{margin-left:33.33%;width:65.5%;padding:2px 10px;font-weight:bold;border:solid 1px #f2f2f2;border-bottom:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;resize:none;border:1px solid #f2f2f2;border-top:none}\n";
echo "textarea.menu{margin-left:33.33%;width:65.5%;margin-bottom:12px;padding:4px 10px;font-family:bitstream;border:1px solid #f2f2f2;border-top:none}\n";
break;
}
?>
@@ -102,7 +102,7 @@ function setDefault(form) {
var label = (i) ? area.shift():title;
var start = (area[0]==menu);
var checked = start ? ' checked':'';
if (i) label += "<span style='float:right'><input type='checkbox' id='input-"+i+"' title='Set default boot menu' onchange='changeMenu(this.form,this.id,true)'"+checked+"></span>";
if (i) label += "<span style='float:right'><input type='radio' id='input-"+i+"' title='Set default boot menu' onchange='changeMenu(this.form,this.id,true)'"+checked+"></span>";
$('#label-'+i).html(label).prop('class',start ? 'array':'system');
if (start) area.shift();
$(this).val(area.join('\n')).prop('rows',area.length).trigger('change');
@@ -216,7 +216,7 @@ Syslinux configuration:
$start = in_array($menu,$area);
if ($start) unset($area[array_search($menu,$area)]);
?><span id="label-<?=$i?>" class="<?=$start?'array':'system'?>"><?=$label?>
<?if ($i):?><span style="float:right"><input type="checkbox" id="input-<?=$i?>" class="menu" <?=$start?'checked':''?> title="Set default boot menu" onchange="changeMenu(this.form,this.id,true)"></span><?endif;?></span>
<?if ($i):?><span style="float:right"><input type="radio" id="input-<?=$i?>" class="menu" <?=$start?'checked':''?> title="Set default boot menu" onchange="changeMenu(this.form,this.id,true)"></span><?endif;?></span>
<textarea class="menu" id="menu-<?=$i++?>" spellcheck="false" cols="80" rows="<?=count($area)?>" maxlength="2048"><?=implode("\n",$area)?></textarea>
<?endforeach;?>