<% if (locals.action) { // Make it possible to override action button color (specify fallback color if no color specified) locals.action.forEach(function(actionItem) { actionItem.button.forEach(function(button) { // Make it possible to override action button color (specify fallback color if no color specified) if (!button.color) { button.color = 'blue'; } deprecatedColorToHex(button); }); }); // Convert deprecated red/green/blue action button color to hex since we switched to a hex-based button color function deprecatedColorToHex(button) { if (button.color === 'red') { button.color = '#DC4D2F'; } else if (button.color === 'green') { button.color = '#22BC66'; } else if (button.color === 'blue') { button.color = '#3869D4'; } } } %>
<% if (locals.action.length !== 0 && locals.action[0].button[0].fallback) { %> <% } %>