Ignore:
Timestamp:
12/02/11 17:03:30 (13 years ago)
Author:
vmipsl
Message:

Login

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/backoffice/user-script.jsp

    r280 r281  
    8080            $.ajax( { 
    8181                url: "backoffice?methodName=modifyUser&" + parametersUrl, 
    82                 success:jQuery.proxy( this.handleModifyUser, this ), 
     82                success:jQuery.proxy( this.handleUser, this ), 
    8383                error: jQuery.proxy( this.showErrors, [this] ) 
    8484            } ); 
     
    117117        this.displayWaitingUsers(); 
    118118        this.displayUsers(); 
    119     }, 
    120  
    121     handleModifyUser: function( result ) 
    122     { 
    123         this.handleUser( result ); 
    124119        this.clearAddOrModifyUserFields(); 
    125120        this.updateAddUserButtonAndTitle(); 
    126  
    127     }, 
     121    }, 
     122 
    128123    // DISPLAYS ******************************************************** 
    129124    displayTRForUser: function( user ) 
     
    142137        tdEmail.html( user.email ); 
    143138        tr.append( tdEmail ); 
    144         var tdPwd = $( document.createElement( "td" ) ); 
    145         tdPwd.html( user.password ); 
    146         tr.append( tdPwd ); 
    147139        var tdRole = $( document.createElement( "td" ) ); 
    148140        tdRole.html( user.role ); 
     
    288280        var actualState = $( "#keepSamePassword" ).attr( 'checked' ); 
    289281        $( "#password" ).attr( 'disabled', actualState ); 
     282        if( actualState ) 
     283            $( "#password" ).val( '' ); 
    290284    }, 
    291285 
     
    298292        $( "#add_or_modify_user" ).bind( 'click', this, jQuery.proxy( this.requestAddUser, this ) ); 
    299293        $( "#add_or_modify_user" ).html( interfaceTexts["bo.add"] ); 
     294        $( "#password" ).attr( 'disabled', false ); 
     295        $( "#keepSamePassword" ).attr( 'disabled', true ); 
    300296    }, 
    301297 
     
    307303        $( "#add_or_modify_user" ).bind( 'click', this, jQuery.proxy( this.requestModifyUser, this ) ); 
    308304        $( "#add_or_modify_user" ).html( interfaceTexts["bo.modify"] ); 
     305        $( "#password" ).attr( 'disabled', true ); 
     306        $( "#keepSamePassword" ).attr( 'disabled', false ); 
    309307    }, 
    310308 
     
    317315                .removeAttr( 'selected' ); 
    318316 
    319         $( "#keepSamePassword" ).attr( 'disabled', true ); 
    320317        this.selectRoles.selectFirst( false ); 
    321318        this.selectStates.selectFirst( false ); 
Note: See TracChangeset for help on using the changeset viewer.