Browse Source

fix: form submission url (#9421)

pull/7999/merge
Anbarasu 4 months ago committed by GitHub
parent
commit
006dec75d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/nocodb/src/helpers/webhookHelpers.ts
  2. 2
      packages/nocodb/src/utils/common/formSubmissionEmailTemplate.ts

11
packages/nocodb/src/helpers/webhookHelpers.ts

@ -713,16 +713,9 @@ export function _transformSubmittedFormDataForEmail(
} }
transformedData[col.title] = (transformedData[col.title] || []) transformedData[col.title] = (transformedData[col.title] || [])
.map((attachment) => { .map((attachment) => {
if ( return attachment.title;
['jpeg', 'gif', 'png', 'apng', 'svg', 'bmp', 'ico', 'jpg'].includes(
attachment.title.split('.').pop(),
)
) {
return `<a href="${attachment.url}" target="_blank"><img height="50px" src="${attachment.url}"/></a>`;
}
return `<a href="${attachment.url}" target="_blank">${attachment.title}</a>`;
}) })
.join('&nbsp;'); .join('<br/>');
} else if ( } else if (
transformedData[col.title] && transformedData[col.title] &&
typeof transformedData[col.title] === 'object' typeof transformedData[col.title] === 'object'

2
packages/nocodb/src/utils/common/formSubmissionEmailTemplate.ts

@ -130,7 +130,7 @@ export default `<!doctype html>
<tr> <tr>
<td style="font-family: sans-serif; font-size: 14px;padding: 20px 5px 10px 5px; " colspan="2"> <td style="font-family: sans-serif; font-size: 14px;padding: 20px 5px 10px 5px; " colspan="2">
<a href="https://github.com/nocodb/nocodb" target="_blank"> <a href="https://github.com/nocodb/nocodb" target="_blank">
<img src="https://www.nocodb.com/brand/x1.png" alt="NocoDB" width="70" style=" vertical-align: middle"> <h2 style="margin-left: 10px;display: inline-block">NocoDB</h2> <img src="https://cdn.nocodb.com/email/logo.png" alt="NocoDB" width="150" style=" vertical-align: middle">
</a> </a>
</td> </td>
</tr> </tr>

Loading…
Cancel
Save