On 4.2.2014 19:00, Nathaniel McCallum wrote:
On Tue, 2014-02-04 at 18:44 +0100, Petr Vobornik wrote:
On 4.2.2014 17:53, Nathaniel McCallum wrote:
On Tue, 2014-01-21 at 17:45 +0100, Petr Vobornik wrote:
On 13.1.2014 17:09, Petr Vobornik wrote:
Hi,
these patches implements the OTP Web UI.
Last 5 patches is the OTP UI.
First 6 patches is a little refactoring/bug fixes needed for them.
General password dialog is introduced to avoid another implementation.
Self-service UI is implemented to be very simple. Atm user can choose
only token name. Admin interface allows to enter all values.
It's based on the RCUE work -> we need to push RCUE first. Thanks
Nathaniel for review of the last font package. It will speed things up.
Know bugs:
- there is clash in id's of checkboxes preventing editation of
subsequently displayed ones with the same name. Will be fixed in
separate patch.
- bugs caused by bugs in API (adding/removal of own tokens in
self-service, inability to enter key on token creation -
https://fedorahosted.org/freeipa/ticket/4099)
- datetime format (widget+validator) will be implemented in separate patch
- no support of not reviewed CLI patches (HOTP..)
Cgit:
http://fedorapeople.org/cgit/pvoborni/public_git/freeipa.git/log/?h=otp
https://fedorahosted.org/freeipa/ticket/3369
Patches were rebased because of minor conflict with trusted domains patch.
Patch 531 seems to have a spacing issue (tabs instead of spaces?) at the
end of the first file.
Nathaniel
Are you using the rebased patches 531-1 .. 541-1? (sent on 2014-01-21)
Yes.
They apply on master without any warning.
I found it with my eyes. :)
Yeah, sorry, I was under impression that you are talking about trailing
whitespaces.
Just look at the bottom of the details.js section of the patch. The line
after "that.parser ..." is indented too far.
Nathaniel
You are right, there is incorrect indentation, but it's just spaces, no
tabs.
Fixed, patch attached.
--
Petr Vobornik
From ff411cbc2d0c858b94671634f764f00f5d76fdda Mon Sep 17 00:00:00 2001
From: Petr Vobornik <[email protected]>
Date: Tue, 17 Sep 2013 10:48:24 +0200
Subject: [PATCH] Added empty value meaning to boolean formatter
Boolean object properties can have different default meaning for not defined
value. This patch allows to defined this meaning to `boolean_formatter` by
introduction of `emty_value` property. `boolean_state_evaluator` was modified
to leverage it as well.
---
install/ui/src/freeipa/details.js | 10 +++++++---
install/ui/src/freeipa/widget.js | 14 +++++++++++++-
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js
index 00134a23da9c2aad42e95f5f0aba6e52584b56a7..907eae47c9b6e9dc507e9592efc42651fdec84c0 100644
--- a/install/ui/src/freeipa/details.js
+++ b/install/ui/src/freeipa/details.js
@@ -1490,17 +1490,21 @@ exp.boolean_state_evaluator = IPA.boolean_state_evaluator = function(spec) {
that.false_state = spec.false_state || that.field_name + '-false';
/**
- * Inverted logic
+ * Inverts evaluation logic
+ *
+ * NOTE: is ignored when custom parser is set
+ *
* @property {boolean}
*/
that.invert_value = spec.invert_value;
/**
* Value parser
+ *
* @property {IPA.boolean_formatter}
*/
- that.parser = IPA.build({
- $factory: spec.parser || IPA.boolean_formatter,
+ that.parser = IPA.build(spec.parser || {
+ $factory: IPA.boolean_formatter,
invert_value: that.invert_value
});
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 9ea5ea0e09056c88a7f5a58116429d65b4ad9265..b3ea3a838428fd12980ac820700344f5c1f36375 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -1838,14 +1838,26 @@ IPA.boolean_formatter = function(spec) {
that.show_false = spec.show_false;
/** Parse return inverted value */
that.invert_value = spec.invert_value;
+ /**
+ * Result of parse of `undefined` or `null` value will be `empty_value`
+ * if set.
+ * @property {boolean|undefined}
+ */
+ that.empty_value = spec.empty_value;
/**
* Convert string boolean value into real boolean value, or keep
* the original value
+ *
+ * @param {Mixed} value Value to parse
+ * @return {boolean|""}
*/
that.parse = function(value) {
- if (value === undefined || value === null) return '';
+ if (value === undefined || value === null) {
+ if (that.empty_value !== undefined) value = that.empty_value;
+ else return '';
+ }
if (value instanceof Array) {
value = value[0];
--
1.8.5.3
_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel