diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-10-11 07:00:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 07:00:13 +0200 |
commit | 5f324264d798c642889f95b51091ffefb09085a5 (patch) | |
tree | 5dcf5fed72eb4f3cc0419235c94950f9388484af | |
parent | 67fd6b6e5ea6b843a4427bed62a31e96f3ff0a1f (diff) | |
parent | 74f52f22ff85f0ac08ee5075f190c469ab20cb6e (diff) |
Merge pull request #2220 from yangfl/packages
luci-mod-system: block install and search if no package lists
-rw-r--r-- | modules/luci-mod-system/luasrc/view/admin_system/packages.htm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/luci-mod-system/luasrc/view/admin_system/packages.htm b/modules/luci-mod-system/luasrc/view/admin_system/packages.htm index 280eabb8ea..39582c6a93 100644 --- a/modules/luci-mod-system/luasrc/view/admin_system/packages.htm +++ b/modules/luci-mod-system/luasrc/view/admin_system/packages.htm @@ -102,16 +102,16 @@ end <div class="cbi-value"> <label class="cbi-value-title"><%:Download and install package%>:</label> <div class="cbi-value-field"> - <span><input type="text" name="url" size="30" value="" /></span> - <input class="cbi-button cbi-button-save" type="submit" name="go" value="<%:OK%>" /> + <span><input type="text" name="url" size="30" <% if no_lists then %>disabled="disabled" placeholder="<%:Please update package lists first%>"<% end %> value="" /></span> + <input class="cbi-button cbi-button-save" type="submit" name="go" <% if no_lists then %>disabled="disabled"<% end %> value="<%:OK%>" /> </div> </div> <div class="cbi-value cbi-value-last"> <label class="cbi-value-title"><%:Filter%>:</label> <div class="cbi-value-field"> - <span><input type="text" name="query" size="20" value="<%=pcdata(query)%>" /></span> - <input type="submit" class="cbi-button cbi-button-action" name="search" value="<%:Find package%>" /> + <span><input type="text" name="query" size="20" <% if no_lists then %>disabled="disabled" placeholder="<%:Please update package lists first%>"<% else %>value="<%=pcdata(query)%>"<% end %> /></span> + <input type="submit" class="cbi-button cbi-button-action" name="search" <% if no_lists then %>disabled="disabled"<% end %> value="<%:Find package%>" /> </div> </div> </div> |