Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-18 Thread Simo Sorce
On Tue, 2011-08-16 at 16:13 -0500, Endi Sukma Dewata wrote:
 On 8/15/2011 10:44 AM, Petr Vobornik wrote:
  On 08/11/2011 07:44 PM, Endi Sukma Dewata wrote:
  The dialog box for resetting user password has been modified to use
  the standard layout.
 
  patch from code and working perspective is OK.
 
  Has this patch assigned some ticket? Don't know exactly what is IPA's
  policy for submitting patches without tickets in Trac (for future
  tracking).
 
 I attached the patch into this ticket:
 https://fedorahosted.org/freeipa/ticket/1641
 We'll push it when we start working on 3.0 stuff.

Have you pushed this one ?
The master branch now is 3.0 material :)

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-18 Thread Endi Sukma Dewata

On 8/18/2011 10:03 AM, Simo Sorce wrote:

On Tue, 2011-08-16 at 16:13 -0500, Endi Sukma Dewata wrote:

On 8/15/2011 10:44 AM, Petr Vobornik wrote:

On 08/11/2011 07:44 PM, Endi Sukma Dewata wrote:

The dialog box for resetting user password has been modified to use
the standard layout.



patch from code and working perspective is OK.



Has this patch assigned some ticket? Don't know exactly what is IPA's
policy for submitting patches without tickets in Trac (for future
tracking).


I attached the patch into this ticket:
https://fedorahosted.org/freeipa/ticket/1641
We'll push it when we start working on 3.0 stuff.


Have you pushed this one ?
The master branch now is 3.0 material :)


OK, I pushed this to master and ipa-2-1 because it's only a cleanup, not 
a new functionality, also minimizing diverging branch.


--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-16 Thread Endi Sukma Dewata

On 8/15/2011 10:44 AM, Petr Vobornik wrote:

On 08/11/2011 07:44 PM, Endi Sukma Dewata wrote:

The dialog box for resetting user password has been modified to use
the standard layout.



patch from code and working perspective is OK.



Has this patch assigned some ticket? Don't know exactly what is IPA's
policy for submitting patches without tickets in Trac (for future
tracking).


I attached the patch into this ticket:
https://fedorahosted.org/freeipa/ticket/1641
We'll push it when we start working on 3.0 stuff.

--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-15 Thread Petr Vobornik

On 08/11/2011 07:44 PM, Endi Sukma Dewata wrote:

The dialog box for resetting user password has been modified to use
the standard layout.



___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

patch from code and working perspective is OK.

Has this patch assigned some ticket? Don't know exactly what is IPA's 
policy for submitting patches without tickets in Trac (for future tracking).


--
Petr Vobornik

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-15 Thread Dmitri Pal
On 08/15/2011 11:44 AM, Petr Vobornik wrote:
 On 08/11/2011 07:44 PM, Endi Sukma Dewata wrote:
 The dialog box for resetting user password has been modified to use
 the standard layout.



 ___
 Freeipa-devel mailing list
 Freeipa-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/freeipa-devel
 patch from code and working perspective is OK.

 Has this patch assigned some ticket? Don't know exactly what is IPA's
 policy for submitting patches without tickets in Trac (for future
 tracking).


I would prefer to have a ticket.

-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IPA project,
Red Hat Inc.


---
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/



___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-15 Thread Endi Sukma Dewata

On 8/15/2011 11:01 AM, Dmitri Pal wrote:

patch from code and working perspective is OK.

Has this patch assigned some ticket? Don't know exactly what is IPA's
policy for submitting patches without tickets in Trac (for future
tracking).


I would prefer to have a ticket.


OK, I'll open a ticket for this. Usually it's part of a clean up process 
or needed for subsequent bug fixing.


--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-15 Thread Dmitri Pal
On 08/15/2011 12:29 PM, Endi Sukma Dewata wrote:
 On 8/15/2011 11:01 AM, Dmitri Pal wrote:
 patch from code and working perspective is OK.

 Has this patch assigned some ticket? Don't know exactly what is IPA's
 policy for submitting patches without tickets in Trac (for future
 tracking).

 I would prefer to have a ticket.

 OK, I'll open a ticket for this. Usually it's part of a clean up
 process or needed for subsequent bug fixing.

Which means that there should be a ticket for the cleanup effort that
encompasses several patches.

-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IPA project,
Red Hat Inc.


---
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/



___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 242 Removed custom layout for password reset.

2011-08-11 Thread Endi Sukma Dewata

The dialog box for resetting user password has been modified to use
the standard layout.

--
Endi S. Dewata
From d1c3958f1f0e5a2b5cdc3a45e03bcf5c009a2268 Mon Sep 17 00:00:00 2001
From: Endi S. Dewata edew...@redhat.com
Date: Wed, 10 Aug 2011 22:47:39 -0500
Subject: [PATCH] Removed custom layout for password reset.

The dialog box for resetting user password has been modified to use
the standard layout.
---
 install/ui/user.js |   94 +--
 1 files changed, 46 insertions(+), 48 deletions(-)

diff --git a/install/ui/user.js b/install/ui/user.js
index 7247035dbd8e0a2e798cfbf0670f0a084a30d7a3..58d33cdba39606054a108d895117ee0f60523ed4 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -310,68 +310,43 @@ IPA.user_password_widget = function(spec) {
 width: 400
 });
 
-dialog.create = function() {
-
-var dl = $('dl/', {
-'class': 'modal'
-}).appendTo(dialog.container);
-
-$('dt/', {
-html: IPA.messages.objects.user.new_password
-}).appendTo(dl);
-
-var dd = $('dd/').appendTo(dl);
-
-dialog.password1 = $('input/', {
-type: 'password'
-}).appendTo(dd);
-
-$('dt/', {
-html: IPA.messages.objects.user.repeat_password
-}).appendTo(dl);
-
-dd = $('dd/').appendTo(dl);
-
-dialog.password2 = $('input/', {
-type: 'password'
-}).appendTo(dd);
-};
+var password1 = dialog.add_field(IPA.text_widget({
+name: 'password1',
+label: IPA.messages.objects.user.new_password,
+type: 'password',
+undo: false
+}));
+
+var password2 = dialog.add_field(IPA.text_widget({
+name: 'password2',
+label: IPA.messages.objects.user.repeat_password,
+type: 'password',
+undo: false
+}));
 
 dialog.add_button(IPA.messages.objects.user.reset_password, function() {
 
-var new_password = dialog.password1.val();
-var repeat_password = dialog.password2.val();
+var record = {};
+dialog.save(record);
+
+var new_password = record.password1;
+var repeat_password = record.password2;
 
 if (new_password != repeat_password) {
 alert(IPA.messages.objects.user.password_must_match);
 return;
 }
 
-var user_pkey = IPA.nav.get_state('user-pkey');
-
-var args;
-if (user_pkey === IPA.whoami.uid[0]) {
-args = [];
-} else {
-args = [user_pkey];
-}
-
-var command = IPA.command({
-method: 'passwd',
-args: args,
-options: {
-password: new_password
-},
-on_success: function(data, text_status, xhr) {
+that.set_password(
+new_password,
+function(data, text_status, xhr) {
 alert(IPA.messages.objects.user.password_change_complete);
 dialog.close();
 },
-on_error: function(xhr, text_status, error_thrown) {
+function(xhr, text_status, error_thrown) {
 dialog.close();
 }
-});
-
-command.execute();
+);
 });
 
 dialog.add_button(IPA.messages.buttons.cancel, function() {
@@ -381,5 +356,28 @@ IPA.user_password_widget = function(spec) {
 dialog.open(that.container);
 };
 
+that.set_password = function(password, on_success, on_error) {
+var user_pkey = IPA.nav.get_state('user-pkey');
+
+var args;
+if (user_pkey === IPA.whoami.uid[0]) {
+args = [];
+} else {
+args = [user_pkey];
+}
+
+var command = IPA.command({
+method: 'passwd',
+args: args,
+options: {
+password: password
+},
+on_success: on_success,
+on_error: on_error
+});
+
+command.execute();
+};
+
 return that;
 };
-- 
1.7.5.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel