File: userupdate.js

package info (click to toggle)
php-horde 5.2.1%2Bdebian0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,196 kB
  • sloc: php: 11,089; xml: 6,460; sh: 96; makefile: 33; sql: 1
file content (25 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
 * Provides the javascript for the admin user update page.
 *
 * @author     Michael Slusarz <slusarz@horde.org>
 * @copyright  2014 Horde LLC
 * @license    LGPL-2 (http://www.horde.org/licenses/lgpl)
 */

var HordeAdminUserUpdate = {

    // Set in admin/user.php: pass_error

    onSubmit: function(e)
    {
        if ($('user_pass_1') &&
            $F('user_pass_1') != $F('user_pass_2')) {
            $('user_pass_1', 'user_pass_2').invoke('setValue', '');
            window.alert(this.pass_error);
            e.stop();
        }
    }

};

document.on('submit', '#updateuser', HordeAdminUserUpdate.onSubmit.bind(HordeAdminUserUpdate));