Fix bugs in template, and rename .disabled to .options.disabled