Show the disabled control in view only mode of properties
parent
86479453b3
commit
146e901327
|
@ -165,9 +165,10 @@ function($, _, S, pgAdmin, Menu, Backbone, Alertify, Backform) {
|
|||
typeof newModel[f.show] == "function" ?
|
||||
newModel[f.show] : undefined,
|
||||
// This can be disabled in some cases (if not hidden)
|
||||
disable: f.disable && newModel[f.disable] &&
|
||||
typeof newModel[f.disable] == "function" ?
|
||||
newModel[f.disable] : undefined,
|
||||
disabled: (type == 'properties' ? true : (
|
||||
f.disabled && newModel[f.disabled] &&
|
||||
typeof newModel[f.disabled] == "function" ?
|
||||
newModel[f.disabled] : undefined)),
|
||||
options: f.options
|
||||
});
|
||||
}
|
||||
|
|
|
@ -57,6 +57,14 @@
|
|||
that.listenTo(that.model, "change:" + name, that.render);
|
||||
});
|
||||
};
|
||||
Backform.Control.prototype.template = _.template([
|
||||
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>',
|
||||
'<div class="<%=Backform.controlsClassName%>">',
|
||||
' <span class="<%=Backform.controlClassName%> uneditable-input" <%=disabled ? "disabled" : ""%>>',
|
||||
' <%=value%>',
|
||||
' </span>',
|
||||
'</div>'
|
||||
].join("\n"));
|
||||
|
||||
// Backform Dialog view (in bootstrap tabbular form)
|
||||
// A collection of field models.
|
||||
|
|
Loading…
Reference in New Issue