Skip to content
Snippets Groups Projects
Commit 0d012d28 authored by Tom Robinson's avatar Tom Robinson
Browse files

Use dashboard_count in card editing header, fix syntax error in DeleteQuestionModal

parent 139a8d33
Branches
Tags
No related merge requests found
......@@ -53,7 +53,7 @@ export default React.createClass({
>
<div className="Form-inputs mb4">
<p>Are you sure you want to do this?</p>
<p>This question will be deleted from Metabase, and will also be removed from:/p>
<p>This question will be deleted from Metabase, and will also be removed from:</p>
<ul>
<li>{dashboardCount}</li>
<li>0 email reports</li>
......
......@@ -13,7 +13,9 @@ import QueryModeToggle from './query_mode_toggle.react';
import QuestionSavedModal from '../components/QuestionSavedModal.react';
import SaveQuestionModal from '../components/SaveQuestionModal.react';
var cx = React.addons.classSet;
import inflection from "inflection";
import cx from "classnames";
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
export default React.createClass({
......@@ -132,10 +134,17 @@ export default React.createClass({
/>
);
}
var subtitleText;
if (this.props.card.dashboard_count > 0) {
subtitleText = "Changes will be reflected in " + this.props.card.dashboard_count + " " + inflection.inflect("dashboard", this.props.card.dashboard_count) + " and can be reverted.";
} else {
subtitleText = "Changes can be reverted."
}
return (
<div className="EditHeader p1 px3 flex align-center">
<span className="EditHeader-title">You are editing a saved question.</span>
<span className="EditHeader-subtitle mx1">Changes will be reflected in 1 dashboard and can be reverted.</span>
<span className="EditHeader-subtitle mx1">{subtitleText}</span>
<span className="flex-align-right">
{updateButton}
{discardButton}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment