Skip to content

Commit

Permalink
Fix backbutton bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mickenordin committed Apr 6, 2017
1 parent a3b92d3 commit 27b0ec9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/Thruk/Controller/api_conf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ endpoint (e.g. objects/services/<hostname>!<servicename>)
=cut

sub display_editor {
my ( $page_type, $hidden, $c, $endpoint, ) = @_;
my ( $page_type, $c, $hidden, $endpoint, ) = @_;
my $name = $page_type;
$name =~ s/s$//;
my $mode = "create";
Expand Down Expand Up @@ -1337,7 +1337,7 @@ sub hosts {

# This is the main host creation dialog
else {
$host_page .= display_editor("hosts");
$host_page .= display_editor("hosts", $c);
}
}
elsif ( $mode eq "modify" ) {
Expand Down Expand Up @@ -1365,7 +1365,7 @@ sub hosts {
elsif ($host) {
my %hidden = ( "host" => $host );
my $endpoint = "objects/hosts/$host";
$host_page .= display_editor( "hosts", \%hidden, $c, $endpoint );
$host_page .= display_editor( "hosts", $c, \%hidden, $endpoint );

}

Expand Down Expand Up @@ -1773,7 +1773,7 @@ s/(input type="hidden" name="mode" value="delete")/$1><input type="hidden" name=
}
$service_page .= '</select><br>';
$service_page .= display_multi_select( "host-select", @host_arr );
$service_page .= display_editor("services");
$service_page .= display_editor("services", $c);
$service_page .= $q->submit(
-name => 'submit',
-value => 'Submit'
Expand Down Expand Up @@ -1811,7 +1811,7 @@ s/(input type="hidden" name="mode" value="delete")/$1><input type="hidden" name=
"service" => $servicename
);
$service_page .=
display_editor( "services", \%hidden, $c,
display_editor( "services", $c, \%hidden,
"objects/services/$host!$servicename" );
}
elsif ($host) {
Expand Down Expand Up @@ -1904,7 +1904,7 @@ sub contacts {
# This is the contact creation dialog
}
else {
$contacts_page .= display_editor("contacts");
$contacts_page .= display_editor("contacts", $c);
}

}
Expand Down Expand Up @@ -1977,7 +1977,7 @@ sub contacts {
my %hidden = ( "contact" => $contact );
my $endpoint = "objects/users/$contact";
$contacts_page .=
display_editor( "contacts", \%hidden, $c, $endpoint );
display_editor( "contacts", $c, \%hidden, $endpoint );
}

# This is selection
Expand Down Expand Up @@ -2077,7 +2077,7 @@ sub contact_groups {

# This is creation dialog
else {
$contactgroups_page .= display_editor("contactgroups");
$contactgroups_page .= display_editor("contactgroups", $c);
}

}
Expand Down Expand Up @@ -2152,7 +2152,7 @@ sub contact_groups {
my %hidden = ( "contactgroup" => $contactgroup );
my $endpoint = "objects/usergroups/$contactgroup";
$contactgroups_page .=
display_editor( "contactgroups", \%hidden, $c, $endpoint );
display_editor( "contactgroups", $c, \%hidden, $endpoint );
}

# This is selection
Expand Down Expand Up @@ -2290,7 +2290,7 @@ sub commands {

# This is main command creation dialog
else {
$command_page .= display_editor("commands");
$command_page .= display_editor("commands", $c);
}

}
Expand Down Expand Up @@ -2324,7 +2324,7 @@ sub commands {
my $endpoint = "objects/checkcommands/$command";

$command_page =
display_editor( "commands", \%hidden, $c, $endpoint );
display_editor( "commands", $c, \%hidden, $endpoint );
}
else {
$command_page = display_command_selection( $c, $mode );
Expand Down

0 comments on commit 27b0ec9

Please sign in to comment.