File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,23 @@ public function updateCMSFields(FieldList $fields)
30
30
$ fields ->addFieldsToTab ('Root.Xero ' , [
31
31
ReadonlyField::create ('XeroAccessToken ' , 'Access token ' )
32
32
->setDescription (sprintf (
33
- '<a href="%s">Link to a xero account</a> ' ,
33
+ '<a href="%s" target="_blank" >Link to a new xero account</a> ' ,
34
34
XeroFactory::singleton ()->getRedirectUri ()
35
35
))
36
36
]);
37
37
38
38
if ($ this ->owner ->XeroAccessToken ) {
39
- $ provider = XeroFactory::singleton ()->getProvider ();
40
39
$ tenants = [];
40
+ $ tenantRecords = XeroFactory::singleton ()->getTenants ($ this ->owner ->XeroAccessToken );
41
41
42
- foreach ($ provider -> getTenants ( $ this -> owner -> XeroAccessToken ) as $ tenant ) {
43
- $ tenants [$ tenant ->id ] = $ tenant ->name ;
42
+ foreach ($ tenantRecords as $ tenant ) {
43
+ $ tenants [$ tenant ->id ] = $ tenant ->tenantName ;
44
44
}
45
45
46
46
$ fields ->addFieldsToTab ('Root.Xero ' , [
47
47
DropdownField::create (
48
48
'XeroTenantId ' ,
49
- 'XeroTenantId ' ,
49
+ 'Xero Tenant ' ,
50
50
$ tenants
51
51
)
52
52
]);
You can’t perform that action at this time.
0 commit comments