From 33359d25ef2e18aed854ee7ccd514c3a05c92c46 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 29 Nov 2013 13:10:30 +0100 Subject: Use fluid layout in host adder dialog fqdn widget --- install/ui/src/freeipa/widget.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'install/ui/src/freeipa/widget.js') diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 28a068bf..9ea5ea0e 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -219,6 +219,12 @@ IPA.input_widget = function(spec) { */ that.height = spec.height; + /** + * Widget is required + * @property {boolean} + */ + that.required = spec.required; + /** * Enable undo button showing. Undo button is displayed when user * modifies data. @@ -4006,11 +4012,14 @@ IPA.table_layout = function(spec) { return that; }; -IPA.fluid_layout = function(spec) { +exp.fluid_layout = IPA.fluid_layout = function(spec) { var that = IPA.layout(spec); that.cont_cls = spec.cont_cls || 'form-horizontal'; + that.widget_cls = spec.widget_cls || 'controls'; + that.label_cls = spec.label_cls || 'control-label'; + that.group_cls = spec.group_cls || 'control-group'; that.create = function(widgets) { @@ -4035,7 +4044,7 @@ IPA.fluid_layout = function(spec) { }; that.create_control_group = function(container, widget) { - var group = $('
', { 'class': 'control-group' }); + var group = $('
', { 'class': that.group_cls }); that.rows.put(widget.name, group); if (widget.hidden) { @@ -4049,7 +4058,7 @@ IPA.fluid_layout = function(spec) { that.create_label = function(widget) { var label_text = widget.label + that.get_measurement_unit_text(widget); - var label_cont = $('
', { 'class': 'control-label' }); + var label_cont = $('
', { 'class': that.label_cls }); var label_el = $('