You are here

function Xpassword_toggle_preprocess_block in Password toggle 6

Preprocessor for block.tpl.php.

Add the password toggle JS when the login block is displayed.

File

./password_toggle.module, line 53
password_toggle.module Simple module that adds a checkbox to toggle password masking on login forms.

Code

function Xpassword_toggle_preprocess_block(&$variables) {
  if ($variables['block']->module == 'user' && $variables['block']->delta == 0) {
    password_toggle_add_js();
  }
}