Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Incorrect URL for "Unsaved Changes" button in header.htm, extra //. #35

Closed
NvrBst opened this issue Jan 20, 2017 · 1 comment
Closed

Comments

@NvrBst
Copy link

NvrBst commented Jan 20, 2017

When you click the "Unsaved Changes" button, it puts and extra "//" between luci and admin, as shown below:

192.168.0.1/cgi-bin/luci//admin/uci/changes?redir=%2fcgi-bin%2fluci%2fadmin%2fnetwork%2fdhcp

The code in header.htm is below. removing the "/" between controller and category does work, but not too sure if thats the correct way to do it:
Line 164: <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><span class="mobile-hide"><%:Unsaved Changes%>: </span><%=ucichanges%></a>

The latest bootstrap theme did what u did. But now moved the button into a function called "render_changes()":

HTML just called Button function: <% render_changes() %>
Code for render_changed():
				write('<a class="label notice" href="%s?redir=%s">%s: %d</a>' %{
					url(category, 'uci/changes'),
					http.urlencode(http.formvalue('redir') or REQUEST_URI),
					translate('Unsaved Changes'),
					ucichanges

Maybe nit picking, but easy fix, and won't have any more malformed URL in the theme.

@LuttyYang
Copy link
Owner

thanks, I fixed this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants