| $text{'ehost_hname'} | \n";
print "";
print &ui_textbox("name", ( $host ? $host->{'values'}->[0] : "" ), 20);
print " | \n";
$assign = $in{'gidx'} ne "" ? "3" :
$in{'uidx'} ne "" ? "2" :
$in{'sidx'} ne "" ? "1" : "0";
if (!defined($in{'ret'})) {
my @labels = ( $text{'ehost_toplevel'}, $text{'ehost_inshared'},
$text{'ehost_insubnet'}, $text{'ehost_ingroup'} );
print "";
print "| $text{'ehost_nojavascr'} | \n" if ($in{'assign'});
print "$text{'ehost_assign'} \n";
if ($in{'assign'}) {
$assign = $in{'assign'};
print "$labels[$assign] | \n";
print &ui_hidden("assign",$assign);
print &ui_hidden("jsquirk",1);
}
else {
my @assign_sel;
for ($i = 0; $i <= 3; $i++) {
push(@assign_sel, [$i, $labels[$i], ( $assign == $i ? "selected" : "" ) ]);
}
print &ui_select("assign", undef, \@assign_sel, 1, undef, undef, undef, "onChange='setparent(0)'" );
print "\n";
}
print "";
my @parent_sel;
if ($assign == 3) {
$ig = 0;
foreach $g (@group) {
my $val = (defined($shared{$g}) ? "$shared{$g}," : "").(defined($subnet{$g}) ? "$subnet{$g}," : "").$g->{'index'};
my $txt = $group_desc[$ig] if &can('rw', \%access, $g);
push(@parent_sel, [$val, $txt, ($ig == $sel_parent ? "selected" : "") ] );
$ig++;
}
}
elsif ($assign == 2) {
$iu = 0;
foreach $u (@subn) {
my $val1 = defined($shared{$u}) ? "$shared{$u},$u->{'index'}" : $u->{'index'};
my $txt1 = $subn_desc[$iu] if &can('rw', \%access, $u);
push(@parent_sel, [$val1, $txt1, ($iu == $sel_parent ? "selected" : "") ] );
$iu++;
}
}
elsif ($assign == 1) {
$is = 0;
foreach $s (@shar) {
my $txt2 = $shar_desc[$is] if &can('rw', \%access, $s);
push(@parent_sel, [$s->{'index'}, $txt1, ($is == $sel_parent ? "selected" : "") ] );
$is++;
}
}
print &ui_select("parent", undef, \@parent_sel, 5, undef, undef, undef, "width=120");
print " | \n";
print "
| \n";
print "
\n";
}
else {
print &ui_hidden("assign",$assign);
print &ui_hidden("parent",$currpar);
}
$hard = $hconf ? &find("hardware", $hconf) : undef;
print "| $text{'ehost_hwaddr'} | \n";
print "";
my @hardware_type_sel;
my @hardware = ("ethernet","token-ring","fddi");
foreach my $hv (@hardware) {
push(@hardware_type_sel, [$hv,$hv, ($hard && $hard->{'values'}->[0] eq $hv ? "selected" : "")] );
}
print &ui_select("hardware_type", undef, \@hardware_type_sel, 1);
print &ui_textbox("hardware", ( $hard ? $hard->{'values'}->[1] : "" ), 18);
print " |
\n";
$fixed = $host ? &find("fixed-address", $hconf) : "";
print "