summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/host.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-01-10 17:28:27 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-03-13 15:59:44 +0100
commit870a5daf24c165069fe6f546bb3710f9b3880538 (patch)
treeb21a65cc0291e15c0fde84c5b61d6ac024260750 /install/ui/src/freeipa/host.js
parent05f612e58a4954162dcaa724585869819ca77672 (diff)
downloadfreeipa-870a5daf24c165069fe6f546bb3710f9b3880538.tar.gz
freeipa-870a5daf24c165069fe6f546bb3710f9b3880538.tar.xz
freeipa-870a5daf24c165069fe6f546bb3710f9b3880538.zip
webui: Datetime parsing and formatting
this patch implements: - output_formatter in field. It should be used in par with formatter. Formatter serves for datasource->widget conversion, output_formatter for widget->datasource format conversion. - datetime module which parses/format strings in subset of ISO 8601 and LDAP generalized time format to Date. - utc formatter replaced with new datetime formatter - datetime_validator introduced - new datetime field, extension of text field, which by default uses datetime formatter and validator Dojo was regenerated to include dojo/string module https://fedorahosted.org/freeipa/ticket/4194 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/host.js')
-rw-r--r--install/ui/src/freeipa/host.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js
index 923c82c65..8b6692282 100644
--- a/install/ui/src/freeipa/host.js
+++ b/install/ui/src/freeipa/host.js
@@ -357,6 +357,19 @@ IPA.host_fqdn_widget = function(spec) {
});
};
+ that.save = function() {
+
+ var hw = that.widgets.get_widget('hostname');
+ var dw = that.widgets.get_widget('dnszone');
+
+ var hostname = hw.save()[0];
+ var dnszone = dw.save()[0];
+
+ var fqdn = hostname && dnszone ? [ hostname+'.'+dnszone ] : [];
+ return fqdn;
+
+ };
+
return that;
};
@@ -400,18 +413,6 @@ IPA.host_fqdn_field = function(spec) {
}
};
- that.save = function(record) {
-
- if(!record) record = {};
-
- var hostname = that.hostname_widget.save()[0];
- var dnszone = that.dns_zone_widget.save()[0];
-
- record.fqdn = hostname && dnszone ? [ hostname+'.'+dnszone ] : [];
-
- return record.fqdn;
- };
-
that.reset = function() {
that.hostname_widget.update([]);