File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8686
8787 action : {
8888 custom : cloudStack . uiCustom . accountsWizard (
89- cloudStack . accountsWizard
89+ cloudStack . accountsWizard ,
90+ false
9091 )
9192 }
9293
93- }
94+ } ,
95+
96+ addLdapAccount : {
97+ label : 'Add LDAP Account' ,
98+ isHeader : true ,
99+ preFilter : function ( args ) {
100+ if ( ( isAdmin ( ) || isDomainAdmin ( ) ) && isLdapEnabled ( ) ) {
101+ return true ;
102+ } else {
103+ return false ;
104+ }
105+ } ,
106+ messages : {
107+ notification : function ( args ) {
108+ return 'Add LDAP Account' ;
109+ }
110+ } ,
111+ notification : {
112+ poll : function ( args ) {
113+ args . complete ( {
114+ actionFilter : accountActionfilter
115+ } ) ;
116+ }
117+ } ,
118+
119+ action : {
120+ custom : cloudStack . uiCustom . accountsWizard (
121+ cloudStack . accountsWizard ,
122+ true
123+ )
124+ }
125+
126+ }
94127 } ,
95128
96129 dataProvider : function ( args ) {
Original file line number Diff line number Diff line change 174174
175175 action : function ( args ) {
176176 var array1 = [ ] ;
177- var ldapStatus = isLdapEnabled ( ) ;
177+ var ldapStatus = args . isLdap ;
178178 if ( args . username ) {
179179 array1 . push ( "&username=" + args . username ) ;
180180 }
Original file line number Diff line number Diff line change 1616// under the License.
1717
1818( function ( $ , cloudStack ) {
19- cloudStack . uiCustom . accountsWizard = function ( args ) {
19+ cloudStack . uiCustom . accountsWizard = function ( args , isLdap ) {
2020 return function ( listViewArgs ) {
2121 var context = listViewArgs . context ;
22- var ldapStatus = isLdapEnabled ( ) ;
22+ var ldapStatus = isLdap ;
2323 var accountsWizard = function ( data ) {
2424 var $wizard = $ ( '#template' ) . find ( 'div.accounts-wizard' ) . clone ( ) ;
2525 var $form = $wizard . find ( 'form' ) ;
3939 args . action ( {
4040 context : context ,
4141 data : data ,
42+ isLdap : isLdap ,
4243 groupname : groupname ,
4344 response : {
4445 error : function ( message ) {
5859 args . action ( {
5960 context : context ,
6061 data : data ,
62+ isLdap : isLdap ,
6163 username : username [ i ] ,
6264 response : {
6365 error : function ( message ) {
7476 args . action ( {
7577 context : context ,
7678 data : data ,
79+ isLdap : isLdap ,
7780 username : username ,
7881 response : {
7982 error : function ( message ) {
188191 $wizard . find ( '.manual-account-details' ) . append ( informationNotInLdapForm ) ;
189192
190193 return $wizard . dialog ( {
191- title : _l ( 'label.add.account' ) ,
194+ title : ldapStatus ? _l ( 'Add LDAP Account' ) : _l ( 'label.add.account' ) ,
192195 width : ldapStatus ? 800 : 330 ,
193196 height : ldapStatus ? 500 : 500 ,
194197 closeOnEscape : false ,
You can’t perform that action at this time.
0 commit comments