<% if (locals.action) { locals.action.forEach(function(actionItem) { // Make it possible to override action button color (specify fallback color if no color specified) if (!actionItem.button.color) { actionItem.button.color = 'blue'; } deprecatedColorToHex(actionItem.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'; } } } %>