diff --git a/pkg/lib/cockpit-components-dialog.jsx b/pkg/lib/cockpit-components-dialog.jsx
index df5cb97adc65..895a90e678d1 100644
--- a/pkg/lib/cockpit-components-dialog.jsx
+++ b/pkg/lib/cockpit-components-dialog.jsx
@@ -211,7 +211,7 @@ var DialogFooter = React.createClass({
if (error_message) {
error_element =
- { error_message }
+ { React.isValidElement(error_message) ? error_message : error_message.toString() }
;
}
return (
@@ -246,10 +246,11 @@ var DialogFooter = React.createClass({
*/
var Dialog = React.createClass({
propTypes: {
- title: React.PropTypes.string.isRequired,
+ // TODO: fix following by refactoring the logic showing modal dialog (recently show_modal_dialog())
+ title: React.PropTypes.string, // is effectively required, but show_modal_dialog() provides initially no props and resets them later.
no_backdrop: React.PropTypes.bool,
- body: React.PropTypes.element.isRequired,
- footer: React.PropTypes.element.isRequired,
+ body: React.PropTypes.element, // is effectively required, see above
+ footer: React.PropTypes.element, // is effectively required, see above
id: React.PropTypes.string,
},
componentDidMount: function() {