Skip to content

Commit 21e0a0d

Browse files
committed
Add email after customer name in dashboard
1 parent 685a391 commit 21e0a0d

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

langs/en_US/sellyoursaas.lang

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,3 +967,4 @@ SaveAndPay=Save and pay
967967
ModulesToIgnoreForAutoUpgrade=Modules to ignore for auto-upgrade
968968
PleaseFillContactInfoFirst=Please fill your contact an dorganization information first
969969
GoToYourResellerMenuTogetInformation=Go to menu "%s" for more information
970+
AccessIsReservedTofinalCustomerOnly=Access is reserved to final customer only (ask him if yo need it)

myaccount/tpl/mycustomerinstances.tpl.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,12 @@
250250

251251
// Customer (link to login on customer dashboard)
252252
print '<span class="opacitymedium">'.$langs->trans("Customer").' : </span>'.$tmpcustomer->name;
253-
$dol_login_hash=dol_hash(getDolGlobalString('SELLYOURSAAS_KEYFORHASH') . $tmpcustomer->email.dol_print_date(dol_now(), 'dayrfc'), 5); // hash is valid one hour
254-
print ' &nbsp;-&nbsp; <a target="_blankcustomer" href="'.$_SERVER["PHP_SELF"].'?mode=logout_dashboard&username='.urlencode($tmpcustomer->email).'&password=&login_hash='.urlencode($dol_login_hash).'"><span class="fa fa-desktop"></span><span class="hideonsmartphone"> '.$langs->trans("LoginWithCustomerAccount").'</span></a>';
253+
print ' &nbsp; '.dol_print_email($tmpcustomer->email);
254+
// Add link to login to dashboard with customer account
255+
/*
256+
$dol_login_hash = dol_hash(getDolGlobalString('SELLYOURSAAS_KEYFORHASH') . $tmpcustomer->email.dol_print_date(dol_now(), 'dayrfc'), 5); // hash is valid one hour
257+
print ' &nbsp; - &nbsp; <a target="_blankcustomer" href="'.$_SERVER["PHP_SELF"].'?mode=logout_dashboard&username='.urlencode($tmpcustomer->email).'&password=&login_hash='.urlencode($dol_login_hash).'"><span class="fa fa-desktop"></span><span class="hideonsmartphone"> '.$langs->trans("LoginWithCustomerAccount").'</span></a>';
258+
*/
255259
print '<br>';
256260

257261
// URL

myaccount/tpl/mymodulecustomerinstances.tpl.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
* @var Conf $conf
2020
* @var DoliDB $db
2121
* @var HookManager $hookmanager
22+
* @var Societe $mythirdpartyaccount
2223
* @var Translate $langs
24+
*
25+
* @var string $initialaction
2326
*/
2427

2528
// Protection to avoid direct call of template
@@ -32,12 +35,14 @@
3235
<!-- BEGIN PHP TEMPLATE mymodulecustomerinstances.tpl.php -->
3336
<?php
3437

38+
/*
3539
$plan = GETPOST('plan', 'alpha');
3640
3741
$planarray = preg_split('/(,|;)/', $plan);
3842
if (!empty($planarray[1])) {
3943
$productref = 'array';
4044
}
45+
*/
4146

4247
print '
4348
<div class="page-content-wrapper">
@@ -249,6 +254,7 @@
249254

250255
// Customer (link to login on customer dashboard)
251256
print '<span class="opacitymedium">'.$langs->trans("Customer").' : </span>'.$tmpcustomer->name;
257+
print ' &nbsp; '.dol_print_email($tmpcustomer->email);
252258
print '<br>';
253259

254260
// URL
@@ -652,9 +658,14 @@
652658

653659
print '
654660
</div>
655-
</div>
656-
<div class="tab-pane" id="tab_ssh_'.$contract->id.'">
657-
<p class="opacitymedium" style="padding: 15px">'.$langs->trans("SSHFTPDesc");
661+
</div>';
662+
663+
print '
664+
<div class="tab-pane" id="tab_ssh_'.$contract->id.'">
665+
<p class="opacitymedium" style="padding: 15px">'.$langs->trans("SSHFTPDesc");
666+
667+
print '<p class="opacitymedium" style="padding: 15px">'.$langs->trans("AccessIsReservedTofinalCustomerOnly").'</p>';
668+
/*
658669
if ($directaccess == 1 || ($directaccess == 2 && empty($foundtemplate)) || ($directaccess == 3 && !empty($foundtemplate))) {
659670
// Show message "To connect, you will need the following information:"
660671
print '<br>'.$langs->trans("SSHFTPDesc2").' :';
@@ -704,12 +715,18 @@
704715
print '<p class="opacitymedium" style="padding: 15px">'.$langs->trans("SorryFeatureNotAvailableInYourPlan").'</p>';
705716
}
706717
}
718+
*/
707719

708720
print '
709-
</div> <!-- END TAB SSH PANE -->
721+
</div> <!-- END TAB SSH PANE -->';
710722

711-
<div class="tab-pane" id="tab_db_'.$contract->id.'">
712-
<p class="opacitymedium" style="padding: 15px">'.$langs->trans("DBDesc");
723+
print '
724+
<div class="tab-pane" id="tab_db_'.$contract->id.'">
725+
<p class="opacitymedium" style="padding: 15px">'.$langs->trans("DBDesc");
726+
727+
print '<p class="opacitymedium" style="padding: 15px">'.$langs->trans("AccessIsReservedTofinalCustomerOnly").'</p>';
728+
729+
/*
713730
if ($directaccess == 1 || ($directaccess == 2 && empty($foundtemplate)) || ($directaccess == 3 && !empty($foundtemplate))) {
714731
// Show message "To connect, you will need the following information:"
715732
print '<br>'.$langs->trans("DBDesc2").' :';
@@ -780,6 +797,7 @@
780797
print '<p class="opacitymedium" style="padding: 15px">'.$langs->trans("SorryFeatureNotAvailableInYourPlan").'</p>';
781798
}
782799
}
800+
*/
783801

784802
print '
785803
</div> <!-- END TAB DB PANE -->

0 commit comments

Comments
 (0)