mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Show the disabled control in view only mode of properties
This commit is contained in:
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
Block a user