On 02/02/2011 04:53 PM, Adam Young wrote:
requires freeipa-rcrit-699-2-city.patch


_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel
Hadn't removed the broken custom widget
From afce50a3e4cf0d5f7f264ba7b5b36dba8bc100b5 Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Wed, 2 Feb 2011 16:51:36 -0500
Subject: [PATCH] city and state
 using approapriate lcoality and state abbreviations for the attributes: l and st

---
 install/ui/user.js |   37 +++----------------------------------
 1 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/install/ui/user.js b/install/ui/user.js
index fcec05e2214770d903f947e1cf63b927a6adde02..4caa0aea6178e2d4e0f14f8068bc20d83d1f0509 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -72,8 +72,8 @@ IPA.entity_factories.user = function (){
             section(
                 IPA.stanza({label: IPA.messages.details.mailing}).
                     input({name:'street'}).
-                    input({name:'location'}).
-                    input({name:'state', load:user_state_load}).
+                    input({name:'l',label:'City'}).
+                    input({name:'st',label:'State/Province'}).
                     input({name:'postalcode'})).
             section(
                 IPA.stanza({label:IPA.messages.details.employee}).
@@ -227,39 +227,8 @@ function user_password_load(result) {
     });
     link.appendTo(dd);
 
-}
+};
 
 var select_temp = '<select title="st"></select>';
 var option_temp = '<option value="V">V</option>';
-var states = [
-    'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM',
-    'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA',
-    'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV',
-    'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW',
-    'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA',
-    'WA', 'WV', 'WI', 'WY', ''
-];
-function user_state_load(result) {
 
-    var that = this;
-
-    $('dd', that.container).remove();
-
-    //var next = dt.next();
-    //next.css('clear', 'none');
-    //next.css('width', '70px');
-
-    var dd = IPA.create_first_dd(this.name);
-    dd.append(select_temp);
-    dd.appendTo(that.container);
-
-    var sel = dd.children().first();
-    for (var i = 0; i < states.length; ++i)
-        sel.append(option_temp.replace(/V/g, states[i]));
-
-    var st = result['st'];
-    if (st)
-        sel.val(st);
-    else
-        sel.val('');
-}
-- 
1.7.3.5

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

Reply via email to