Updated panelForm so panel controls only display if there is a button
Added JS for optimise dialog panel vertical size by making panel-content scroll but fit maximum available space