treewide: improve handling of page redirections in uci change views
[project/luci.git] / themes / luci-theme-bootstrap / luasrc / view / themes / bootstrap / header.htm
index 6f09bfc..0441c95 100644 (file)
                        if ucichanges > 0 then
                                write('<a class="label notice" href="%s?redir=%s">%s: %d</a>' %{
                                        url(category, 'uci/changes'),
-                                       http.urlencode(http.formvalue('redir') or REQUEST_URI),
+                                       http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
                                        translate('Unsaved Changes'),
                                        ucichanges
                                })
                        </div>
                <%- end -%>
 
+               <noscript>
+                       <div class="alert-message warning">
+                               <strong><%:JavaScript required!%></strong><br />
+                               <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
+                       </div>
+               </noscript>
+
                <div id="maincontent" class="container">
                        <% if category then render_tabmenu(category, cattree) end %>