requires freeipa-rcrit-699-2-city.patch
From e512649514666234abc1bed8634ed0088051931d 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 | 39 +++++---------------------------------- 1 files changed, 5 insertions(+), 34 deletions(-) diff --git a/install/ui/user.js b/install/ui/user.js index fcec05e2214770d903f947e1cf63b927a6adde02..7f4f696d1eb921961178caa1adc42bc41b070666 100644 --- a/install/ui/user.js +++ b/install/ui/user.js @@ -72,8 +72,10 @@ 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'}). + custom_input(IPA.select_widget( + {name:'st', options:IPA.states})). input({name:'postalcode'})). section( IPA.stanza({label:IPA.messages.details.employee}). @@ -227,39 +229,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