Commit eaa2dc4e authored by Ted Trask's avatar Ted Trask

Change HTML views to display connection if there was a connection error

parent d70a634f
......@@ -27,7 +27,7 @@
-- hide the database, since we don't need it to list databases
form.value.connection.value.database = nil
end %>
<% if form.value.connection and next(form.value.connection.value) ~= nil then
<% if form.value.connection and ( next(form.value.connection.value) ~= nil or form.value.connection.errtxt ) then
htmlviewfunctions.displayformstart(form, page_info)
htmlviewfunctions.displayitem(form.value.connection, page_info, htmlviewfunctions.incrementheader(header_level), "connection")
form.option = "Update"
......
......@@ -25,7 +25,8 @@
<% htmlviewfunctions.displaycommandresults({"createdatabase"}, session, true) %>
<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<% if form.value.connection and next(form.value.connection.value) ~= nil then
<% htmlviewfunctions.displayinfo(form) %>
<% if form.value.connection and ( next(form.value.connection.value) ~= nil or form.value.connection.errtxt ) then
htmlviewfunctions.displayformstart(form, page_info)
htmlviewfunctions.displayitem(form.value.connection, page_info, htmlviewfunctions.incrementheader(header_level), "connection")
form.option = "Update"
......
......@@ -42,7 +42,7 @@ keyvalues.redir = redir.value
<%
local header_level2 = htmlviewfunctions.incrementheader(header_level)
htmlviewfunctions.displayformstart(form, page_info)
if form.value.connection and next(form.value.connection.value) ~= nil then
if form.value.connection and ( next(form.value.connection.value) ~= nil or form.value.connection.errtxt ) then
htmlviewfunctions.displayitem(form.value.connection, page_info, header_level2, "connection")
end
htmlviewfunctions.displayitem(form.value.table, page_info, header_level2, "table")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment