Commit bb323633 authored by Charlie Hoy's avatar Charlie Hoy
Browse files

only adding popular choices if it is not None

parent 10f6ffa7
......@@ -373,11 +373,12 @@ class page():
self.add_content("<button type='submit' onclick='combine()'>Submit</button>\n", indent=2)
self.add_content("</div>\n")
self.add_content("<div class='row justify-content-center'>\n")
for i in popular_options:
self.add_content("<button type='button' class='btn btn-light' "
"onclick='combine(\"{}\")' "
"style='margin-left:0.25em; margin-right:0.25em; "
"margin-top: 1.0em'>{}</button>\n".format(i, i), indent=2)
if popular_options:
for i in popular_options:
self.add_content("<button type='button' class='btn btn-light' "
"onclick='combine(\"{}\")' "
"style='margin-left:0.25em; margin-right:0.25em; "
"margin-top: 1.0em'>{}</button>\n".format(i, i), indent=2)
self.add_content("</div>")
self.add_content("<div class='row justify-content-center' id='corner_plot'>\n")
self.add_content("<canvas id='canvas' width='600' height='600'></canvas>\n", indent=2)
......
Supports Markdown
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