@@ -995,7 +995,35 @@ const addBfAccount = async (ev, verifyingOrganization = False) => {
995
995
document . getElementsByClassName ( "swal2-popup" ) [ 0 ] . style . width = "43rem" ;
996
996
div_footer . style . flexDirection = "column" ;
997
997
div_footer . style . alignItems = "center" ;
998
- if ( verifyingOrganization ) {
998
+ if ( ! verifyingOrganization ) {
999
+ let swal_actions = document . getElementsByClassName ( "swal2-actions" ) [ 0 ] ;
1000
+ let api_button = document . createElement ( "button" ) ;
1001
+ let api_arrow = document . createElement ( "i" ) ;
1002
+ let helpText = document . createElement ( "p" )
1003
+ helpText . innerText = "Recommended only if you sign in to Pennsieve with your ORCID iD."
1004
+ helpText . classList . add ( "tip-content" ) ;
1005
+ // set margin to auto
1006
+ helpText . style . margin = "auto" ;
1007
+
1008
+ api_button . innerText = "Connect with API key instead" ;
1009
+ // set length to 270
1010
+ api_button . setAttribute ( "onclick" , "showBFAddAccountSweetalert()" ) ;
1011
+ api_arrow . classList . add ( "fas" ) ;
1012
+ api_arrow . classList . add ( "fa-arrow-right" ) ;
1013
+ api_arrow . style . marginLeft = "10px" ;
1014
+ api_button . type = "button" ;
1015
+ api_button . style . border = "" ;
1016
+ api_button . id = "api_connect_btn" ;
1017
+ api_button . classList . add ( "transition-btn" ) ;
1018
+ api_button . classList . add ( "api_key-btn" ) ;
1019
+ api_button . classList . add ( "back" ) ;
1020
+ api_button . style . display = "inline" ;
1021
+ api_button . appendChild ( api_arrow ) ;
1022
+ swal_actions . parentElement . insertBefore ( api_button , div_footer ) ;
1023
+ swal_actions . parentElement . insertBefore ( helpText , div_footer ) ;
1024
+
1025
+ }
1026
+ else {
999
1027
// hide the cancel button
1000
1028
let cancel_button = document . getElementsByClassName ( "swal2-cancel" ) [ 0 ] ;
1001
1029
cancel_button . style . display = "none" ;
0 commit comments