Fix backlink to bsdfdisk module, include device in link to create a new mount

This commit is contained in:
Jamie Cameron
2013-03-30 12:14:00 -07:00
parent 5cf4f8f561
commit a598c1541d
2 changed files with 11 additions and 5 deletions

View File

@@ -259,8 +259,9 @@ if (!$in{'new'} && !$pinfo->{'extended'}) {
if ($types[0] eq "swap") {
# Swap partition
print &ui_buttons_row("../mount/edit_mount.cgi",
$text{'edit_newmount2'}, $text{'edit_mountmsg2'},
&ui_hidden("type", $types[0]));
$text{'edit_newmount2'},$text{'edit_mountmsg2'},
&ui_hidden("type", $types[0]).
&ui_hidden("newdev", $dev));
}
else {
# For some filesystem
@@ -274,7 +275,8 @@ if (!$in{'new'} && !$pinfo->{'extended'}) {
}
print &ui_buttons_row("../mount/edit_mount.cgi",
$text{'edit_newmount'}, $text{'edit_mountmsg'},
undef, $dirsel);
&ui_hidden("newdev", $dev),
$dirsel);
}
}

View File

@@ -1170,6 +1170,10 @@ my @stat = @_;
my $stat = "";
my $statdesc = $stat[0] =~ /^swap/ ? "<i>$text{'disk_vm'}</i>"
: "<tt>$stat[0]</tt>";
my $ret = $main::initial_module_name;
if ($ret !~ /fdisk$/) {
$ret = $module_name;
}
if ($stat[1] eq 'raid') {
$stat = $statdesc;
}
@@ -1193,12 +1197,12 @@ elsif ($stat[0] && !&foreign_available("mount")) {
}
elsif ($stat[0] && $stat[3] == -1) {
$stat = "<a href='../mount/edit_mount.cgi?".
"index=$stat[4]&temp=1&return=/$module_name/'>".
"index=$stat[4]&temp=1&return=/$ret/'>".
"$statdesc</a>";
}
elsif ($stat[0]) {
$stat = "<a href='../mount/edit_mount.cgi?".
"index=$stat[3]&return=/$module_name/'>".
"index=$stat[3]&return=/$ret/'>".
"$statdesc</a>";
}
return $stat;