libs/cbi: Catch errors while creating named sections
[project/luci.git] / libs / cbi / luasrc / view / cbi / tsection.htm
index 33d5c8e..70c44aa 100644 (file)
@@ -45,8 +45,12 @@ $Id$
                        <% if self.anonymous then -%>
                                <input type="submit" class="cbi-button cbi-button-add" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:cbi_add%>" />
                        <%- else -%>
+                               <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %>
                                <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
                                <input type="submit" class="cbi-button cbi-button-add" value="<%:cbi_add%>" />
+                               <% if self.invalid_cts then -%>
+                                       <br /><%:cbi_invalid%></div>
+                               <%- end %>
                        <%- end %>
                </div>
        <%- end %>