diff --git a/ChangeLog b/ChangeLog index 4ac16041c..818bea60a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-04-05 Ludovic Marcotte + + * UI/WebServerResources/SOGoRootPage.js + We now correctly use our rounded value for the + expire value when using ppolicy. + + * UI/Contacts/UIxContactEditor.m + We now use URL: in cards w/o a home/work preferred + value as a home URL. + 2010-04-02 Francis Lachapelle * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 471332431..f272ba7c8 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -439,6 +439,18 @@ to: [self _simpleValueForType: @"work" inArray: elements]]; [self _setSnapshotValue: @"homeURL" to: [self _simpleValueForType: @"home" inArray: elements]]; + + // If we don't have a "work" or "home" URL but we still have + // an URL field present, let's add it to the "home" value + if ([[snapshot objectForKey: @"workURL"] length] == 0 && + [[snapshot objectForKey: @"homeURL"] length] == 0 && + [elements count] > 0) + { + [self _setSnapshotValue: @"homeURL" + to: [[elements objectAtIndex: 0] value: 0]]; + } + + [self _setSnapshotValue: @"calFBURL" to: [[card uniqueChildWithTag: @"FBURL"] value: 0]]; diff --git a/UI/WebServerResources/SOGoRootPage.js b/UI/WebServerResources/SOGoRootPage.js index 8958d2a4c..fa65003f6 100644 --- a/UI/WebServerResources/SOGoRootPage.js +++ b/UI/WebServerResources/SOGoRootPage.js @@ -302,15 +302,15 @@ function createPasswordExpirationDialog(expire) { var value, string; if (expire > 86400) { - value = expire/86400; + value = Math.round(expire/86400); string = _("days"); } else if (expire > 3600) { - value = expire/3600; + value = Math.round(expire/3600); string = _("hours"); } else if (expire > 60) { - value = expire/60; + value = Math.round(expire/60); string = _("minutes"); } else { @@ -319,7 +319,7 @@ function createPasswordExpirationDialog(expire) { } return createDialog("passwordExpirationDialog", _("Password about to expire"), - _("Your password is going to expire in %{0} %{1}.").formatted(expire, string), + _("Your password is going to expire in %{0} %{1}.").formatted(value, string), button, "right"); }