From 98baf1536eb1b47d8258e188e1c80393182c6525 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 23 Mar 2017 19:41:08 -0700 Subject: Fixing issue with ids for selenium (#5859) * Fixing issue with ids for selenium * removing comment --- webapp/components/setting_item_max.jsx | 2 +- webapp/components/setting_item_min.jsx | 5 +++-- webapp/utils/utils.jsx | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'webapp') diff --git a/webapp/components/setting_item_max.jsx b/webapp/components/setting_item_max.jsx index 9f3c4f0cf..2da500394 100644 --- a/webapp/components/setting_item_max.jsx +++ b/webapp/components/setting_item_max.jsx @@ -107,7 +107,7 @@ export default class SettingItemMax extends React.Component { {clientError} {submit} {this.props.title} {editButton}
  • {this.props.describe} diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index b3370e88c..820f1a1c7 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -31,6 +31,14 @@ export function isMac() { return navigator.platform.toUpperCase().indexOf('MAC') >= 0; } +export function createSafeId(str) { + if (str === null) { + return null; + } + + return str.replace(' ', '_'); +} + export function cmdOrCtrlPressed(e) { return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey && !e.altKey); } -- cgit v1.2.3-1-g7c22