Merge pull request #1788 from ONLYOFFICE/fix/bugfix
Add customer->phone info to About
This commit is contained in:
commit
f8249a4106
|
@ -115,6 +115,7 @@
|
||||||
address: 'New-York, 125f-25',
|
address: 'New-York, 125f-25',
|
||||||
mail: 'support@gmail.com',
|
mail: 'support@gmail.com',
|
||||||
www: 'www.superpuper.com',
|
www: 'www.superpuper.com',
|
||||||
|
phone: '1234567890',
|
||||||
info: 'Some info',
|
info: 'Some info',
|
||||||
logo: '',
|
logo: '',
|
||||||
logoDark: '', // logo for dark theme
|
logoDark: '', // logo for dark theme
|
||||||
|
|
|
@ -126,6 +126,12 @@ define([
|
||||||
'<a href="mailto:" id="id-about-company-mail"></a>',
|
'<a href="mailto:" id="id-about-company-mail"></a>',
|
||||||
'</td>',
|
'</td>',
|
||||||
'</tr>',
|
'</tr>',
|
||||||
|
'<tr>',
|
||||||
|
'<td align="center" class="padding-small">',
|
||||||
|
'<label class="asc-about-desc-name">' + this.txtTel + '</label>',
|
||||||
|
'<label class="asc-about-desc" id="id-about-company-tel"></label>',
|
||||||
|
'</td>',
|
||||||
|
'</tr>',
|
||||||
'<tr>',
|
'<tr>',
|
||||||
'<td align="center" class="padding-small">',
|
'<td align="center" class="padding-small">',
|
||||||
'<a href="" target="_blank" id="id-about-company-url"></a>',
|
'<a href="" target="_blank" id="id-about-company-url"></a>',
|
||||||
|
@ -177,6 +183,7 @@ define([
|
||||||
this.lblCompanyMail = _$l.findById('#id-about-company-mail');
|
this.lblCompanyMail = _$l.findById('#id-about-company-mail');
|
||||||
this.lblCompanyUrl = _$l.findById('#id-about-company-url');
|
this.lblCompanyUrl = _$l.findById('#id-about-company-url');
|
||||||
this.lblCompanyLic = _$l.findById('#id-about-company-lic');
|
this.lblCompanyLic = _$l.findById('#id-about-company-lic');
|
||||||
|
this.lblCompanyTel = _$l.findById('#id-about-company-tel');
|
||||||
|
|
||||||
this.$el.html(_$l);
|
this.$el.html(_$l);
|
||||||
this.$el.addClass('about-dlg');
|
this.$el.addClass('about-dlg');
|
||||||
|
@ -224,6 +231,11 @@ define([
|
||||||
this.lblCompanyMail.attr('href', "mailto:"+value).text(value) :
|
this.lblCompanyMail.attr('href', "mailto:"+value).text(value) :
|
||||||
this.lblCompanyMail.parents('tr').addClass('hidden');
|
this.lblCompanyMail.parents('tr').addClass('hidden');
|
||||||
|
|
||||||
|
value = customer.phone;
|
||||||
|
value && value.length ?
|
||||||
|
this.lblCompanyTel.text(value) :
|
||||||
|
this.lblCompanyTel.parents('tr').addClass('hidden');
|
||||||
|
|
||||||
if ((value = customer.www) && value.length) {
|
if ((value = customer.www) && value.length) {
|
||||||
var http = !/^https?:\/{2}/i.test(value) ? "http:\/\/" : '';
|
var http = !/^https?:\/{2}/i.test(value) ? "http:\/\/" : '';
|
||||||
this.lblCompanyUrl.attr('href', http+value).text(value);
|
this.lblCompanyUrl.attr('href', http+value).text(value);
|
||||||
|
|
|
@ -12,6 +12,7 @@ const PageAbout = props => {
|
||||||
const customer = licInfo ? licInfo.customer : null;
|
const customer = licInfo ? licInfo.customer : null;
|
||||||
const nameCustomer = customer ? customer.name : null;
|
const nameCustomer = customer ? customer.name : null;
|
||||||
const mailCustomer = customer ? customer.mail : null;
|
const mailCustomer = customer ? customer.mail : null;
|
||||||
|
const phoneCustomer = customer ? customer.phone : null;
|
||||||
const addressCustomer = customer ? customer.address : null;
|
const addressCustomer = customer ? customer.address : null;
|
||||||
const urlCustomer = customer ? customer.www : null;
|
const urlCustomer = customer ? customer.www : null;
|
||||||
const infoCustomer = customer ? customer.info : null;
|
const infoCustomer = customer ? customer.info : null;
|
||||||
|
@ -61,6 +62,13 @@ const PageAbout = props => {
|
||||||
<Link id="settings-about-email" external={true} href={"mailto:"+mailCustomer}>{mailCustomer}</Link>
|
<Link id="settings-about-email" external={true} href={"mailto:"+mailCustomer}>{mailCustomer}</Link>
|
||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
|
{phoneCustomer && phoneCustomer.length ? (
|
||||||
|
<p>
|
||||||
|
<label>{_t.textTel}:</label>
|
||||||
|
<Link id="settings-about-tel" external={true} href={"tel:"+phoneCustomer}>{phoneCustomer}</Link>
|
||||||
|
</p>
|
||||||
|
) : null}
|
||||||
|
|
||||||
{urlCustomer && urlCustomer.length ? (
|
{urlCustomer && urlCustomer.length ? (
|
||||||
<p>
|
<p>
|
||||||
<Link id="settings-about-url" className="external" target="_blank"
|
<Link id="settings-about-url" className="external" target="_blank"
|
||||||
|
|
Loading…
Reference in a new issue