Make sure there's a 'None' option if the select-account is not required so user is not forced to pick an account.

This commit is contained in:
Nathan Gray 2013-06-25 22:15:09 +00:00
parent c8d2953c85
commit 35da74fac0

View File

@ -70,6 +70,12 @@ var et2_selectAccount = et2_selectbox.extend(
{
this.egw().debug("warn", "Invalid account_type: %s Valid options:",_attrs['account_type'], this.account_types);
}
// If not required, make sure there's an empty label
if(_attrs['rows'] == 1 && !_attrs['empty_label'] && !_attrs['required'])
{
_attrs['empty_label'] = 'None';
}
// Holder for search jQuery nodes
this.search = null;