File tree Expand file tree Collapse file tree 1 file changed +22
-14
lines changed
services/static-webserver/client/source/class/osparc/po Expand file tree Collapse file tree 1 file changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -268,20 +268,28 @@ qx.Class.define("osparc.po.UsersPending", {
268268 return ;
269269 }
270270 if ( form . validate ( ) ) {
271- const approveUser = ( ) => {
272- approveBtn . setFetching ( true ) ;
273- this . __approveUser ( email , form )
274- . then ( ( ) => {
275- osparc . FlashMessenger . logAs ( qx . locale . Manager . tr ( "User approved" ) , "INFO" ) ;
276- } )
277- . catch ( err => osparc . FlashMessenger . logError ( err ) )
278- . finally ( ( ) => {
279- approveBtn . setFetching ( false ) ;
280- win . close ( ) ;
281- } ) ;
282- } ;
283-
284-
271+ const msg = this . tr ( "This user has no access to the project. Do you want to share it?" ) ;
272+ const win = new osparc . ui . window . Confirmation ( msg ) . set ( {
273+ caption : this . tr ( "Share" ) ,
274+ confirmText : this . tr ( "Share" ) ,
275+ confirmAction : "create"
276+ } ) ;
277+ win . center ( ) ;
278+ win . open ( ) ;
279+ win . addListener ( "close" , ( ) => {
280+ if ( win . getConfirmed ( ) ) {
281+ approveBtn . setFetching ( true ) ;
282+ this . __approveUser ( email , form )
283+ . then ( ( ) => {
284+ osparc . FlashMessenger . logAs ( qx . locale . Manager . tr ( "User approved" ) , "INFO" ) ;
285+ } )
286+ . catch ( err => osparc . FlashMessenger . logError ( err ) )
287+ . finally ( ( ) => {
288+ approveBtn . setFetching ( false ) ;
289+ win . close ( ) ;
290+ } ) ;
291+ }
292+ } ) ;
285293 }
286294 } ) ;
287295 } ) ;
You can’t perform that action at this time.
0 commit comments