Removing sections as special type of object

Sections are changed into pure widget objects. Introduced IPA.composite_widget, basic widget for widget nesting (it's using IPA.widget_container). It's base class for section widgets.

TODO: change old custom sections into custom fields and widgets.

Note: usage of section in HBAC and SUDO is kept - whole logic will be removed in #1515 patch.

https://fedorahosted.org/freeipa/ticket/2040
This commit is contained in:
Petr Vobornik
2011-11-22 17:33:09 +01:00
committed by Endi S. Dewata
parent 6cdf09812d
commit e021542120
13 changed files with 404 additions and 627 deletions

View File

@@ -197,8 +197,8 @@ IPA.host_fqdn_section = function(spec) {
that.create = function(container) {
that.container = container;
var hostname = that.get_field('hostname');
var dnszone = that.get_field('dnszone');
var hostname = that.fields.get_field('hostname');
var dnszone = that.fields.get_field('dnszone');
var table = $('<table/>', {
'class': 'fqdn'
@@ -268,10 +268,10 @@ IPA.host_fqdn_section = function(spec) {
};
that.save = function(record) {
var field = that.get_field('hostname');
var field = that.fields.get_field('hostname');
var hostname = field.save()[0];
field = that.get_field('dnszone');
field = that.fields.get_field('dnszone');
var dnszone = field.save()[0];
record.fqdn = hostname && dnszone ? [ hostname+'.'+dnszone ] : [];
@@ -444,8 +444,8 @@ IPA.host_enrollment_section = function(spec) {
that.create = function(container) {
that.table_section_create(container);
var keytab_field = that.get_field('has_keytab');
var password_field = that.get_field('has_password');
var keytab_field = that.fields.get_field('has_keytab');
var password_field = that.fields.get_field('has_password');
/**
* The set_password() in the password field is being customized to