An icon is not needed when not showing an userentity in the sidebar menu (references #242)

This commit is contained in:
Bernd Bestel
2019-09-20 10:22:59 +02:00
parent aa670adefc
commit 6ce4e6cb37
2 changed files with 19 additions and 0 deletions

View File

@@ -64,5 +64,21 @@ $('#userentity-form input').keydown(function(event)
}
});
$("#show_in_sidebar_menu").on("click", function()
{
if (this.checked)
{
$("#icon_css_class").removeAttr("disabled");
}
else
{
$("#icon_css_class").attr("disabled", "");
}
});
$('#name').focus();
Grocy.FrontendHelpers.ValidateForm('userentity-form');
// Click twice to trigger on-click but not change the actual checked state
$("#show_in_sidebar_menu").click();
$("#show_in_sidebar_menu").click();