@@ -162,7 +162,7 @@ define(function() {
162
162
$ ( '#fileSystemIrodsZone' ) . val ( clientOptions . IRODS_ZONE ) ;
163
163
$ ( '#fileSystemIrodsHomeDir' ) . val ( clientOptions . IRODS_HOME_DIR ) ;
164
164
$ ( '#fileSystemIrodsPort' ) . val ( clientOptions . IRODS_PORT ) ;
165
- $ ( '#fileSystemIrodsCsneg' ) . val ( clientOptions . IRODS_CSNEG ) ;
165
+ $ ( '#fileSystemIrodsCsneg' ) . val ( clientOptions . IRODS_CSNEG ) ;
166
166
}
167
167
168
168
var isPasswordAuth = isExistingFileSystem && fileSystem . authType === 'PASSWORD' ;
@@ -174,18 +174,17 @@ define(function() {
174
174
175
175
$ ( '#fileSystemPubKeyRegistrationUrl' ) . val ( "" ) ;
176
176
177
-
178
- if ( fileSystem . clientType === 'IRODS' ) {
179
- var rows = fileSystem . clientOptions . split ( '\n' ) ;
180
- for ( var i = 0 ; i < rows . length ; i ++ ) {
181
- var currRow = rows [ i ] ;
182
- var currRowValue = currRow . substring ( currRow . indexOf ( '=' ) + 1 ) ;
183
- if ( currRow . indexOf ( 'IRODS_AUTH' ) === 0 ) {
184
- $ ( '#iRODSfileSystemAuthTypeNative' ) . prop ( 'checked' , currRowValue === 'NATIVE' ) ;
185
- $ ( '#iRODSfileSystemAuthTypePAM' ) . prop ( 'checked' , currRowValue === 'PAM' ) ;
186
- }
177
+ if ( fileSystem . clientType === 'IRODS' ) {
178
+ var rows = fileSystem . clientOptions . split ( '\n' ) ;
179
+ for ( var i = 0 ; i < rows . length ; i ++ ) {
180
+ var currRow = rows [ i ] ;
181
+ var currRowValue = currRow . substring ( currRow . indexOf ( '=' ) + 1 ) ;
182
+ if ( currRow . indexOf ( 'IRODS_AUTH' ) === 0 ) {
183
+ $ ( '#iRODSfileSystemAuthTypeNative' ) . prop ( 'checked' , currRowValue === 'NATIVE' ) ;
184
+ $ ( '#iRODSfileSystemAuthTypePAM' ) . prop ( 'checked' , currRowValue === 'PAM' ) ;
187
185
}
188
- }
186
+ }
187
+ }
189
188
190
189
if ( fileSystem . authOptions ) {
191
190
if ( isPubKeyAuth ) {
@@ -316,34 +315,34 @@ define(function() {
316
315
$ ( '.fileSystemDetailsIrodsHomeDirRow' ) . toggle ( isIrodsClient ) ;
317
316
$ ( '.fileSystemDetailsIrodsPortRow' ) . toggle ( isIrodsClient ) ;
318
317
$ ( '.fileSystemDetailsIrodsCsnegRow' ) . toggle ( isIrodsClient ) ;
319
- $ ( '.fileSystemDetailsIrodsAuthRow' ) . toggle ( isIrodsClient ) ;
320
-
321
- $ ( '#fileSystemAuthTypePubKey' ) . prop ( 'disabled' , isSambaClient ) ;
322
- if ( isSambaClient ) {
318
+ $ ( '.fileSystemDetailsIrodsAuthRow' ) . toggle ( isIrodsClient ) ;
319
+
320
+ $ ( '#fileSystemIrodsZone' ) . prop ( 'required' , isIrodsClient ) ;
321
+ $ ( '#fileSystemIrodsHomeDir' ) . prop ( 'required' , isIrodsClient ) ;
322
+ $ ( '#iRODSfileSystemAuthTypeNative' ) . prop ( 'required' , isIrodsClient ) ;
323
+ $ ( '#iRODSfileSystemAuthTypePAM' ) . prop ( 'required' , isIrodsClient ) ;
324
+
325
+ $ ( '#fileSystemAuthTypePubKey' ) . prop ( 'disabled' , isSambaClient || isSambaSmbjClient ) ;
326
+ $ ( "label[for='fileSystemAuthTypePubKey']" ) . toggle ( ! isIrodsClient ) ;
327
+ if ( isSambaClient || isIrodsClient ) {
323
328
$ ( '#fileSystemAuthTypePassword' ) . click ( ) ;
324
329
}
330
+ $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( sysNetfileSysDetAuthPasswd ) ;
331
+ $ ( "label[for='fileSystemUrl']" ) . text ( sysNetFileSysDetUrl ) ;
332
+ if ( isIrodsClient ) {
333
+ $ ( "label[for='fileSystemUrl']" ) . text ( 'iRODS Host' ) ;
334
+ }
325
335
326
336
if ( isSambaClient || isSambaSmbjClient ) {
327
337
$ ( '#fileSystemUrl' )
328
338
. attr ( 'title' , 'Samba server URL should start with smb://' )
329
339
. attr ( 'pattern' , '^smb://.*' ) ;
330
- $ ( "label[for='fileSystemAuthTypePubKey']" ) . show ( ) ;
331
- $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( sysNetfileSysDetAuthPasswd ) ;
332
- $ ( "label[for='fileSystemUrl']" ) . text ( sysNetFileSysDetUrl ) ;
333
340
} else if ( isIrodsClient ) {
334
- $ ( '#fileSystemAuthTypePassword' ) . click ( ) ;
335
341
$ ( '#fileSystemUrl' )
336
342
. removeAttr ( 'pattern' )
337
343
. attr ( 'title' , 'iRODS hostname or IP without protocol' ) ;
338
- $ ( "label[for='fileSystemUrl']" ) . text ( 'iRODS Host' ) ;
339
- $ ( "label[for='fileSystemAuthTypePubKey']" ) . hide ( ) ;
340
- //$('#fileSystemAuthTypePasswordSpan').text('Native');
341
- $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( sysNetfileSysDetAuthPasswd ) ;
342
344
} else {
343
345
$ ( '#fileSystemUrl' ) . removeAttr ( 'title' ) . removeAttr ( 'pattern' ) ;
344
- $ ( "label[for='fileSystemAuthTypePubKey']" ) . show ( ) ;
345
- $ ( '#fileSystemAuthTypePasswordSpan' ) . text ( sysNetfileSysDetAuthPasswd ) ;
346
- $ ( "label[for='fileSystemUrl']" ) . text ( sysNetFileSysDetUrl ) ;
347
346
}
348
347
}
349
348
0 commit comments