diff options
author | yangfl <yangfl@users.noreply.github.com> | 2018-10-10 22:00:46 +0800 |
---|---|---|
committer | yangfl <yangfl@users.noreply.github.com> | 2018-10-11 08:10:31 +0800 |
commit | 74f52f22ff85f0ac08ee5075f190c469ab20cb6e (patch) | |
tree | 5dcf5fed72eb4f3cc0419235c94950f9388484af /modules/luci-mod-system/luasrc/view | |
parent | 67fd6b6e5ea6b843a4427bed62a31e96f3ff0a1f (diff) |
luci-mod-system: block install and search if no package lists
Signed-off-by: David Yang <mmyangfl@gmail.com>
Diffstat (limited to 'modules/luci-mod-system/luasrc/view')
-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> |