By policy, no default_value can be set for forms API password fields. For this module that's rather annoying. It would be better to present the password as a series of * so that users don't need to enter the password each time they wish to change some other field.

Comments

mvc’s picture

Status: Active » Needs review
StatusFileSize
new505 bytes
mvc’s picture

updated patch for rc5 (new location for service.inc)

drunken monkey’s picture

StatusFileSize
new1.27 KB

Ah, thanks a lot for reporting this! I can see how this would be annoying if you have a password-protected Solr server, yes …

However, I don't know about your patch's approach, I think there's a good reason you cannot set a default value for password fields. I can't recall seeing this anywhere else on the web, and I'd also not be sure that all browsers even allow it.

How about we just ignore the value if it's empty and the HTTP user wasn't changed? Patch attached, please test!

mvc’s picture

it's valid XHTML from what i know, but i agree it doesn't really make sense and probably shouldn't even be possible. your approach is much better! the patch works perfectly for me; i tried saving the page with the username intact and with it removed and it behaved as expected. one small comment: i would suggest adding a #description to the password field explaining all this. for example: "If this field is left blank and the HTTP username is filled out, the current password will not be changed."

drunken monkey’s picture

one small comment: i would suggest adding a #description to the password field explaining all this.

Thanks for the suggestion!
Added that and committed.

drunken monkey’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.