summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-system/luasrc
diff options
context:
space:
mode:
authoryangfl <yangfl@users.noreply.github.com>2018-10-10 22:00:46 +0800
committeryangfl <yangfl@users.noreply.github.com>2018-10-11 08:10:31 +0800
commit74f52f22ff85f0ac08ee5075f190c469ab20cb6e (patch)
tree5dcf5fed72eb4f3cc0419235c94950f9388484af /modules/luci-mod-system/luasrc
parent67fd6b6e5ea6b843a4427bed62a31e96f3ff0a1f (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')
-rw-r--r--modules/luci-mod-system/luasrc/view/admin_system/packages.htm8
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 280eabb8e..39582c6a9 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>