citygate 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/app/assets/javascripts/FormToWizard/formToWizard.js +73 -0
  2. data/app/assets/javascripts/citygate/home.js.coffee.erb +10 -2
  3. data/app/assets/stylesheets/{citygate/application.css → citygate.css} +1 -1
  4. data/app/assets/stylesheets/citygate/main.sass +66 -0
  5. data/app/controllers/citygate/home_controller.rb +3 -3
  6. data/app/controllers/citygate/users/omniauth_callbacks_controller.rb +30 -10
  7. data/app/models/citygate/user.rb +3 -3
  8. data/app/views/citygate/users/show.html.erb +1 -1
  9. data/app/views/devise/registrations/new.html.erb +294 -7
  10. data/config/accounts.yml +4 -1
  11. data/config/initializers/devise.rb +20 -12
  12. data/db/migrate/20121203192704_add_username_to_users.rb +5 -0
  13. data/lib/citygate/version.rb +1 -1
  14. data/lib/gravatar.rb +3 -2
  15. data/spec/dummy/app/assets/stylesheets/application.css +1 -0
  16. data/spec/dummy/config/accounts.yml +4 -1
  17. data/spec/dummy/db/development.sqlite3 +0 -0
  18. data/spec/dummy/log/development.log +4348 -0
  19. data/spec/dummy/log/test.log +12025 -0
  20. data/spec/dummy/spec/controllers/omniauth_spec.rb +25 -13
  21. data/spec/dummy/spec/spec_helper.rb +16 -2
  22. data/spec/dummy/tmp/cache/assets/C72/B10/sprockets%2F21a4b8118f1f4254bf815e306027b951 +0 -0
  23. data/spec/dummy/tmp/cache/assets/C79/FC0/sprockets%2F76c2f8ffd1175afd6274640057134300 +0 -0
  24. data/spec/dummy/tmp/cache/assets/C7A/CE0/sprockets%2F9124c83a02e7332a90b2883b69f81d04 +0 -0
  25. data/spec/dummy/tmp/cache/assets/CD6/2B0/sprockets%2F08e01b4122e606428c6de7234d87bee1 +0 -0
  26. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  27. data/spec/dummy/tmp/cache/assets/CDE/740/sprockets%2Fd1b2f20e9078f3e36137e8b667142d0e +0 -0
  28. data/spec/dummy/tmp/cache/assets/CE2/7D0/sprockets%2Fe69b8c4ca0800c940d1d9785f1a92327 +0 -0
  29. data/spec/dummy/tmp/cache/assets/CE3/150/sprockets%2F7d7a09e1df5c7510266a8d752683c4b3 +0 -0
  30. data/spec/dummy/tmp/cache/assets/D0D/DE0/sprockets%2Fa35442f02b0b2479f22d83d639d8c4fd +0 -0
  31. data/spec/dummy/tmp/cache/assets/D17/B10/sprockets%2F1b9347b2411ff7861eae8a1818c8e9a5 +0 -0
  32. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  33. data/spec/dummy/tmp/cache/assets/D38/5A0/sprockets%2F28c05de34dc72ecd0b6bd4638154915b +0 -0
  34. data/spec/dummy/tmp/cache/assets/D49/470/sprockets%2F565524e575e174ffddf333d46b1e9aa7 +0 -0
  35. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  36. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  37. data/spec/dummy/tmp/cache/assets/D60/C20/sprockets%2Fa5fd3eab22b64b2c0633e456d0e3f295 +0 -0
  38. data/spec/dummy/tmp/cache/assets/D88/100/sprockets%2Ffa444d8b711a22aac73e5711ea7ea24b +0 -0
  39. data/spec/dummy/tmp/cache/assets/D99/BF0/sprockets%2F2fd8d582e234f8d0a741c1b4cafb716e +0 -0
  40. data/spec/dummy/tmp/cache/assets/D9E/F10/sprockets%2F9ab223df888d724dcad09eb1163cc5f4 +0 -0
  41. data/spec/dummy/tmp/cache/assets/DBA/340/sprockets%2Fc374302a8cc07f4c0bcfedb154f4fb21 +0 -0
  42. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  43. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  44. data/spec/dummy/tmp/cache/assets/E5B/D60/sprockets%2F36ec61eefe5552fc432abfeec7cf60ab +0 -0
  45. metadata +86 -161
@@ -0,0 +1,73 @@
1
+ /* Created by jankoatwarpspeed.com */
2
+
3
+ (function($) {
4
+ $.fn.formToWizard = function(options) {
5
+ options = $.extend({
6
+ submitButton: ""
7
+ }, options);
8
+
9
+ var element = this;
10
+
11
+ var steps = $(element).find("fieldset");
12
+ var count = steps.size();
13
+ var submmitButtonName = "#" + options.submitButton;
14
+ $(submmitButtonName).hide();
15
+
16
+ // 2
17
+ $(element).before("<ul id='steps'></ul>");
18
+
19
+ steps.each(function(i) {
20
+ $(this).wrap("<div id='step" + i + "'></div>");
21
+ $(this).append("<p id='step" + i + "commands'></p>");
22
+
23
+ // 2
24
+ var name = $(this).find("legend").html();
25
+ $("#steps").append("<li id='stepDesc" + i + "'>Step " + (i + 1) + "<span>" + name + "</span></li>");
26
+
27
+ if (i == 0) {
28
+ createNextButton(i);
29
+ selectStep(i);
30
+ }
31
+ else if (i == count - 1) {
32
+ $("#step" + i).hide();
33
+ createPrevButton(i);
34
+ }
35
+ else {
36
+ $("#step" + i).hide();
37
+ createPrevButton(i);
38
+ createNextButton(i);
39
+ }
40
+ });
41
+
42
+ function createPrevButton(i) {
43
+ var stepName = "step" + i;
44
+ $("#" + stepName + "commands").append("<a href='#' id='" + stepName + "Prev' class='prev'>< Back</a>");
45
+
46
+ $("#" + stepName + "Prev").bind("click", function(e) {
47
+ $("#" + stepName).hide();
48
+ $("#step" + (i - 1)).show();
49
+ $(submmitButtonName).hide();
50
+ selectStep(i - 1);
51
+ });
52
+ }
53
+
54
+ function createNextButton(i) {
55
+ var stepName = "step" + i;
56
+ $("#" + stepName + "commands").append("<a href='#' id='" + stepName + "Next' class='next'>Next ></a>");
57
+
58
+ $("#" + stepName + "Next").bind("click", function(e) {
59
+ $("#" + stepName).hide();
60
+ $("#step" + (i + 1)).show();
61
+ if (i + 2 == count)
62
+ $(submmitButtonName).show();
63
+ selectStep(i + 1);
64
+ });
65
+ }
66
+
67
+ function selectStep(i) {
68
+ $("#steps li").removeClass("current");
69
+ $("#stepDesc" + i).addClass("current");
70
+ }
71
+
72
+ }
73
+ })(jQuery);
@@ -8,7 +8,15 @@ $ ->
8
8
  init: ->
9
9
  role_selector.select_new_role()
10
10
 
11
+ form_wizard =
12
+ init: ->
13
+ $("#new_user").formToWizard({ submitButton: 'save-account' })
14
+
15
+ ready = ->
16
+ role_selector.init()
17
+ form_wizard.init()
18
+
11
19
  # When using turbolinks
12
- $(window).bind 'page:change', role_selector.init()
20
+ $(document).on('page:load', ready)
13
21
  # otherwise
14
- role_selector.init()
22
+ ready()
@@ -9,5 +9,5 @@
9
9
  * compiled file, but it's generally better to create a new file per style scope.
10
10
  *
11
11
  *= require_self
12
- *= require_tree .
12
+ *= require citygate/main
13
13
  */
@@ -11,3 +11,69 @@
11
11
  #flash_alert
12
12
  background-color: #FCC
13
13
  border: solid 1px #C66
14
+
15
+ fieldset
16
+ border: none
17
+ width: 320px
18
+
19
+ legend
20
+ font-size: 18px
21
+ margin: 0px
22
+ padding: 10px 0px
23
+ color: #b0232a
24
+ font-weight: bold
25
+
26
+ label
27
+ display: block
28
+ margin: 15px 0 5px
29
+
30
+ input[type=text], input[type=password], input[type=email]
31
+ width: 300px
32
+ padding: 5px
33
+ border:solid 1px #000
34
+
35
+ .prev, .next
36
+ background-color: #b0232a
37
+ padding: 5px 10px
38
+ color: #fff
39
+ text-decoration: none
40
+
41
+ &:hover
42
+ background-color: #000
43
+ text-decoration: none
44
+
45
+ .prev
46
+ float: left
47
+
48
+ .next
49
+ float: right
50
+
51
+ #steps
52
+ list-style: none
53
+ width: 100%
54
+ overflow: hidden
55
+ margin: 0px
56
+ padding: 0px
57
+
58
+ li
59
+ font-size: 24px
60
+ float: left
61
+ padding: 10px
62
+ color: #b0b1b3
63
+
64
+ &.current
65
+ color: #000
66
+
67
+ span
68
+ font-size: 11px
69
+ display: block
70
+
71
+ #makeWizard
72
+ background-color: #b0232a
73
+ color: #fff
74
+ padding: 5px 10px
75
+ text-decoration: none
76
+ font-size: 18px
77
+
78
+ &:hover
79
+ background-color: #000
@@ -1,14 +1,14 @@
1
1
  class Citygate::HomeController < Citygate::ApplicationController
2
2
  authorize_resource :class => false
3
3
  skip_authorize_resource :only => :role_change
4
-
4
+
5
5
  def index
6
6
  @users = Citygate::User.all
7
7
  end
8
-
8
+
9
9
  def role_change
10
10
  saved = current_user.update_attribute :role_id, params[:data]
11
-
11
+
12
12
  respond_to do |format|
13
13
  format.json { render json: { text: (saved) ? "OK" : "Arrebentou", redirect: root_path } }
14
14
  end
@@ -6,17 +6,21 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
6
6
  def facebook
7
7
  oauthorize "Facebook"
8
8
  end
9
-
9
+
10
10
  # Authorize user with his google (openid) account
11
11
  def google
12
12
  oauthorize "Google"
13
13
  end
14
-
14
+
15
+ def twitter
16
+ oauthorize "Twitter"
17
+ end
18
+
15
19
  # In case of error renders 404
16
20
  def passthru
17
21
  render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
18
22
  end
19
-
23
+
20
24
  private
21
25
 
22
26
  def oauthorize(kind)
@@ -30,7 +34,7 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
30
34
  @user.authorizations.map(&:destroy)
31
35
  flash[:error] = @user.errors.full_messages.first
32
36
  redirect_to new_user_registration_url
33
- end
37
+ end
34
38
  end
35
39
 
36
40
  def find_for_oauth(provider, access_token, resource=nil)
@@ -39,13 +43,13 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
39
43
  when "Facebook"
40
44
  uid = access_token['uid']
41
45
  email = access_token['extra']['raw_info']['email']
42
- auth_attr = {
43
- :uid => uid,
46
+ auth_attr = {
47
+ :uid => uid,
44
48
  :token => access_token['credentials']['token'],
45
49
  :secret => nil,
46
50
  :name => access_token['extra']['raw_info']['name'],
47
51
  :link => access_token['extra']['raw_info']['link'],
48
- :image_url => access_token['info']['image']
52
+ :image_url => access_token['info']['image']
49
53
  }
50
54
  when "Google"
51
55
  uid = access_token['uid']
@@ -56,6 +60,16 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
56
60
  :secret => nil,
57
61
  :name => access_token['info']['name'],
58
62
  }
63
+ when "Twitter"
64
+ uid = access_token['extra']['raw_info']['id']
65
+ name = access_token['extra']['raw_info']['name']
66
+ auth_attr = {
67
+ :uid => uid,
68
+ :token => access_token['credentials']['token'],
69
+ :secret => nil,
70
+ :name => access_token['extra']['raw_info']['name'],
71
+ :image_url => access_token['extra']['raw_info']['profile_image_url']
72
+ }
59
73
  else
60
74
  raise "Provider #{provider} not handled"
61
75
  end
@@ -74,7 +88,13 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
74
88
  auth = user.authorizations.find_by_provider(provider)
75
89
  auth ||= user.authorizations.build(:provider => provider)
76
90
  auth.update_attributes auth_attr
77
-
91
+
92
+ #TODO: Add config for this
93
+ user.update_attributes(
94
+ role_id: 1,
95
+ confirmed_at: Time.now
96
+ )
97
+
78
98
  return user
79
99
  end
80
100
 
@@ -100,8 +120,8 @@ class Citygate::Users::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
100
120
  if user = Citygate::User.find_by_first_name(name)
101
121
  user
102
122
  else
103
- user = Citygate::User.new(:first_name => name, :password => Devise.friendly_token[0,20], :email => "#{UUIDTools::UUID.random_create}@host")
104
- user.save false
123
+ user = Citygate::User.new(:first_name => name, :password => Devise.friendly_token[0,20], :email => "#{UUIDTools::UUID.random_create}@host.com")
124
+ user.save
105
125
  end
106
126
  return user
107
127
  end
@@ -1,5 +1,5 @@
1
1
  module Citygate
2
-
2
+
3
3
  # @author Zamith
4
4
  # @!attribute name
5
5
  # @return [String] the name of the user
@@ -15,11 +15,11 @@ module Citygate
15
15
  devise :encryptor => :sha1
16
16
  # @!endgroup
17
17
 
18
- attr_accessible :first_name, :last_name, :email, :password, :password_confirmation, :remember_me, :confirmed_at, :role_id
18
+ attr_accessible :first_name, :last_name, :email, :password, :password_confirmation, :remember_me, :confirmed_at, :role_id, :username
19
19
 
20
20
  has_many :authorizations, :dependent => :destroy
21
21
  belongs_to :role
22
-
22
+
23
23
  before_create :check_no_of_users
24
24
 
25
25
  def method_missing(method_name, *args, &block)
@@ -10,7 +10,7 @@
10
10
  <% class_str += (connected_providers.include? provider.to_s.capitalize) ? "connected" : "can-connect" %>
11
11
 
12
12
  <div class="<%= class_str %>">
13
- <%= link_to "#{provider.to_s.capitalize}", user_omniauth_authorize_path(provider, {user: current_user}) %>
13
+ <%= link_to "#{provider.to_s.capitalize}", "/users/auth/#{provider.to_s}?user=#{current_user.id}" %>
14
14
  </div>
15
15
  <% end %>
16
16
  </div>
@@ -3,16 +3,303 @@
3
3
  <%= form_for resource, :as => resource_name, :url => registration_path(resource_name) do |f| %>
4
4
  <%= devise_error_messages! %>
5
5
 
6
- <%= f.label :email %>
7
- <%= f.email_field :email, :required => true %>
6
+ <fieldset>
7
+ <legend>Account Information</legend>
8
+ <%= f.label :email %>
9
+ <%= f.email_field :email, :required => true %>
8
10
 
9
- <%= f.label :password %>
10
- <%= f.password_field :password, :required => true %>
11
+ <%= f.label :password %>
12
+ <%= f.password_field :password, :required => true %>
11
13
 
12
- <%= f.label :password_confirmation %>
13
- <%= f.password_field :password_confirmation, :required => true %>
14
+ <%= f.label :password_confirmation %>
15
+ <%= f.password_field :password_confirmation, :required => true %>
16
+ </fieldset>
14
17
 
15
- <%= f.submit t('admin.users.new.create_link') %>
18
+ <fieldset>
19
+ <legend>Billing information</legend>
20
+ <label for="NameOnCard">Name on Card</label>
21
+ <input id="NameOnCard" type="text" />
22
+ <label for="CardNumber">Card Number</label>
23
+ <input id="CardNumber" type="text" />
24
+ <label for="CreditcardMonth">Expiration</label>
25
+ <select id="CreditcardMonth">
26
+ <option value="1">1</option>
27
+ <option value="2">2</option>
28
+ <option value="3">3</option>
29
+ <option value="4">4</option>
30
+ <option value="5">5</option>
31
+ <option value="6">6</option>
32
+ <option value="7">7</option>
33
+ <option value="8">8</option>
34
+ <option value="9">9</option>
35
+ <option value="10">10</option>
36
+ <option value="11">11</option>
37
+ <option value="12">12</option>
38
+ </select>
39
+ <select id="CreditcardYear">
40
+ <option value="2009">2009</option>
41
+ <option value="2010">2010</option>
42
+ <option value="2011">2011</option>
43
+ <option value="2012">2012</option>
44
+ <option value="2013">2013</option>
45
+ <option value="2014">2014</option>
46
+ <option value="2015">2015</option>
47
+ <option value="2016">2016</option>
48
+ <option value="2017">2017</option>
49
+ <option value="2018">2018</option>
50
+ <option value="2019">2019</option>
51
+ </select>
52
+ <label for="Address1">Address 1</label>
53
+ <input id="Address1" type="text" />
54
+ <label for="Address2">Address 2</label>
55
+ <input id="Address2" type="text" />
56
+ <label for="City">City</label>
57
+ <input id="City" type="text" />
58
+ <label for="City">City</label>
59
+ <select id="Country">
60
+ <option value="CA">Canada</option>
61
+ <option value="US">United States of America</option>
62
+ <option value="GB">United Kingdom (Great Britain)</option>
63
+ <option value="AU">Australia</option>
64
+ <option value="JP">Japan</option>
65
+ <option value="AF">Afghanistan</option>
66
+ <option value="AX">Aland Island</option>
67
+ <option value="AL">Albania</option>
68
+ <option value="DZ">Algeria</option>
69
+ <option value="AS">American Samoa</option>
70
+ <option value="AD">Andorra</option>
71
+ <option value="AO">Angola</option>
72
+ <option value="AI">Anguilla</option>
73
+ <option value="AQ">Antarctica</option>
74
+ <option value="AG">Antigua & Barbuda</option>
75
+ <option value="AR">Argentina</option>
76
+ <option value="AM">Armenia</option>
77
+ <option value="AW">Aruba</option>
78
+ <option value="AT">Austria</option>
79
+ <option value="AZ">Azerbaijan</option>
80
+ <option value="BS">Bahama</option>
81
+ <option value="BH">Bahrain</option>
82
+ <option value="BD">Bangladesh</option>
83
+ <option value="BB">Barbados</option>
84
+ <option value="BY">Belarus</option>
85
+ <option value="BE">Belgium</option>
86
+ <option value="BZ">Belize</option>
87
+ <option value="BJ">Benin</option>
88
+ <option value="BM">Bermuda</option>
89
+ <option value="BT">Bhutan</option>
90
+ <option value="BO">Bolivia</option>
91
+ <option value="BA">Bosnia and Herzegovina</option>
92
+ <option value="BW">Botswana</option>
93
+ <option value="BV">Bouvet Island</option>
94
+ <option value="BR">Brazil</option>
95
+ <option value="IO">British Indian Ocean Territory</option>
96
+ <option value="VG">British Virgin Islands</option>
97
+ <option value="BN">Brunei Darussalam</option>
98
+ <option value="BG">Bulgaria</option>
99
+ <option value="BF">Burkina Faso</option>
100
+ <option value="BI">Burundi</option>
101
+ <option value="KH">Cambodia</option>
102
+ <option value="CM">Cameroon</option>
103
+ <option value="CV">Cape Verde</option>
104
+ <option value="KY">Cayman Islands</option>
105
+ <option value="CF">Central African Republic</option>
106
+ <option value="TD">Chad</option>
107
+ <option value="CL">Chile</option>
108
+ <option value="CN">China</option>
109
+ <option value="CX">Christmas Island</option>
110
+ <option value="CC">Cocos (Keeling) Islands</option>
111
+ <option value="CO">Colombia</option>
112
+ <option value="KM">Comoros</option>
113
+ <option value="CG">Congo</option>
114
+ <option value="CK">Cook Iislands</option>
115
+ <option value="CR">Costa Rica</option>
116
+ <option value="HR">Croatia</option>
117
+ <option value="CU">Cuba</option>
118
+ <option value="CY">Cyprus</option>
119
+ <option value="CZ">Czech Republic</option>
120
+ <option value="CI">Côte D'ivoire (Ivory Coast)</option>
121
+ <option value="DK">Denmark</option>
122
+ <option value="DJ">Djibouti</option>
123
+ <option value="DM">Dominica</option>
124
+ <option value="DO">Dominican Republic</option>
125
+ <option value="TP">East Timor</option>
126
+ <option value="EC">Ecuador</option>
127
+ <option value="EG">Egypt</option>
128
+ <option value="SV">El Salvador</option>
129
+ <option value="GQ">Equatorial Guinea</option>
130
+ <option value="ER">Eritrea</option>
131
+ <option value="EE">Estonia</option>
132
+ <option value="ET">Ethiopia</option>
133
+ <option value="FK">Falkland Islands (Malvinas)</option>
134
+ <option value="FO">Faroe Islands</option>
135
+ <option value="FJ">Fiji</option>
136
+ <option value="FI">Finland</option>
137
+ <option value="FR">France</option>
138
+ <option value="FX">France, Metropolitan</option>
139
+ <option value="GF">French Guiana</option>
140
+ <option value="PF">French Polynesia</option>
141
+ <option value="TF">French Southern Territories</option>
142
+ <option value="GA">Gabon</option>
143
+ <option value="GM">Gambia</option>
144
+ <option value="GE">Georgia</option>
145
+ <option value="DE">Germany</option>
146
+ <option value="GH">Ghana</option>
147
+ <option value="GI">Gibraltar</option>
148
+ <option value="GR">Greece</option>
149
+ <option value="GL">Greenland</option>
150
+ <option value="GD">Grenada</option>
151
+ <option value="GP">Guadeloupe</option>
152
+ <option value="GU">Guam</option>
153
+ <option value="GT">Guatemala</option>
154
+ <option value="GN">Guinea</option>
155
+ <option value="GW">Guinea-Bissau</option>
156
+ <option value="GY">Guyana</option>
157
+ <option value="HT">Haiti</option>
158
+ <option value="HM">Heard & McDonald Islands</option>
159
+ <option value="HN">Honduras</option>
160
+ <option value="HK">Hong Kong</option>
161
+ <option value="HU">Hungary</option>
162
+ <option value="IS">Iceland</option>
163
+ <option value="IN">India</option>
164
+ <option value="ID">Indonesia</option>
165
+ <option value="IQ">Iraq</option>
166
+ <option value="IE">Ireland</option>
167
+ <option value="IR">Islamic Republic of Iran</option>
168
+ <option value="IL">Israel</option>
169
+ <option value="IT">Italy</option>
170
+ <option value="JM">Jamaica</option>
171
+ <option value="JO">Jordan</option>
172
+ <option value="KZ">Kazakhstan</option>
173
+ <option value="KE">Kenya</option>
174
+ <option value="KI">Kiribati</option>
175
+ <option value="KP">Korea, Democratic People's Republic of</option>
176
+ <option value="KR">Korea, Republic of</option>
177
+ <option value="KW">Kuwait</option>
178
+ <option value="KG">Kyrgyzstan</option>
179
+ <option value="LA">Lao People's Democratic Republic</option>
180
+ <option value="LV">Latvia</option>
181
+ <option value="LB">Lebanon</option>
182
+ <option value="LS">Lesotho</option>
183
+ <option value="LR">Liberia</option>
184
+ <option value="LY">Libyan Arab Jamahiriya</option>
185
+ <option value="LI">Liechtenstein</option>
186
+ <option value="LT">Lithuania</option>
187
+ <option value="LU">Luxembourg</option>
188
+ <option value="MO">Macau</option>
189
+ <option value="MG">Madagascar</option>
190
+ <option value="MW">Malawi</option>
191
+ <option value="MY">Malaysia</option>
192
+ <option value="MV">Maldives</option>
193
+ <option value="ML">Mali</option>
194
+ <option value="MT">Malta</option>
195
+ <option value="MH">Marshall Islands</option>
196
+ <option value="MQ">Martinique</option>
197
+ <option value="MR">Mauritania</option>
198
+ <option value="MU">Mauritius</option>
199
+ <option value="YT">Mayotte</option>
200
+ <option value="MX">Mexico</option>
201
+ <option value="FM">Micronesia</option>
202
+ <option value="MD">Moldova, Republic of</option>
203
+ <option value="MC">Monaco</option>
204
+ <option value="MN">Mongolia</option>
205
+ <option value="MS">Monserrat</option>
206
+ <option value="MA">Morocco</option>
207
+ <option value="MZ">Mozambique</option>
208
+ <option value="MM">Myanmar</option>
209
+ <option value="NA">Namibia</option>
210
+ <option value="NR">Nauru</option>
211
+ <option value="NP">Nepal</option>
212
+ <option value="NL">Netherlands</option>
213
+ <option value="AN">Netherlands Antilles</option>
214
+ <option value="NC">New Caledonia</option>
215
+ <option value="NZ">New Zealand</option>
216
+ <option value="NI">Nicaragua</option>
217
+ <option value="NE">Niger</option>
218
+ <option value="NG">Nigeria</option>
219
+ <option value="NU">Niue</option>
220
+ <option value="NF">Norfolk Island</option>
221
+ <option value="MP">Northern Mariana Islands</option>
222
+ <option value="NO">Norway</option>
223
+ <option value="OM">Oman</option>
224
+ <option value="PK">Pakistan</option>
225
+ <option value="PW">Palau</option>
226
+ <option value="PA">Panama</option>
227
+ <option value="PG">Papua New Guinea</option>
228
+ <option value="PY">Paraguay</option>
229
+ <option value="PE">Peru</option>
230
+ <option value="PH">Philippines</option>
231
+ <option value="PN">Pitcairn</option>
232
+ <option value="PL">Poland</option>
233
+ <option value="PT">Portugal</option>
234
+ <option value="PR">Puerto Rico</option>
235
+ <option value="QA">Qatar</option>
236
+ <option value="RO">Romania</option>
237
+ <option value="RU">Russian Federation</option>
238
+ <option value="RW">Rwanda</option>
239
+ <option value="RE">Réunion</option>
240
+ <option value="LC">Saint Lucia</option>
241
+ <option value="WS">Samoa</option>
242
+ <option value="SM">San Marino</option>
243
+ <option value="ST">Sao Tome & Principe</option>
244
+ <option value="SA">Saudi Arabia</option>
245
+ <option value="SN">Senegal</option>
246
+ <option value="RS">Serbia</option>
247
+ <option value="SC">Seychelles</option>
248
+ <option value="SL">Sierra Leone</option>
249
+ <option value="SG">Singapore</option>
250
+ <option value="SK">Slovakia</option>
251
+ <option value="SI">Slovenia</option>
252
+ <option value="SB">Solomon Islands</option>
253
+ <option value="SO">Somalia</option>
254
+ <option value="ZA">South Africa</option>
255
+ <option value="GS">South Georgia and the South Sandwich Islands</option>
256
+ <option value="ES">Spain</option>
257
+ <option value="LK">Sri Lanka</option>
258
+ <option value="SH">St. Helena</option>
259
+ <option value="KN">St. Kitts and Nevis</option>
260
+ <option value="PM">St. Pierre & Miquelon</option>
261
+ <option value="VC">St. Vincent & the Grenadines</option>
262
+ <option value="SD">Sudan</option>
263
+ <option value="SR">Suriname</option>
264
+ <option value="SJ">Svalbard & Jan Mayen Islands</option>
265
+ <option value="SZ">Swaziland</option>
266
+ <option value="SE">Sweden</option>
267
+ <option value="CH">Switzerland</option>
268
+ <option value="SY">Syrian Arab Republic</option>
269
+ <option value="TW">Taiwan, Province of China</option>
270
+ <option value="TJ">Tajikistan</option>
271
+ <option value="TZ">Tanzania, United Republic of</option>
272
+ <option value="TH">Thailand</option>
273
+ <option value="TG">Togo</option>
274
+ <option value="TK">Tokelau</option>
275
+ <option value="TO">Tonga</option>
276
+ <option value="TT">Trinidad & Tobago</option>
277
+ <option value="TN">Tunisia</option>
278
+ <option value="TR">Turkey</option>
279
+ <option value="TM">Turkmenistan</option>
280
+ <option value="TC">Turks & Caicos Islands</option>
281
+ <option value="TV">Tuvalu</option>
282
+ <option value="UG">Uganda</option>
283
+ <option value="UA">Ukraine</option>
284
+ <option value="AE">United Arab Emirates</option>
285
+ <option value="UM">United States Minor Outlying Islands</option>
286
+ <option value="VI">United States Virgin Islands</option>
287
+ <option value="UY">Uruguay</option>
288
+ <option value="UZ">Uzbekistan</option>
289
+ <option value="VU">Vanuatu</option>
290
+ <option value="VA">Vatican City State (Holy See)</option>
291
+ <option value="VE">Venezuela</option>
292
+ <option value="VN">Viet Nam</option>
293
+ <option value="WF">Wallis & Futuna Islands</option>
294
+ <option value="EH">Western Sahara</option>
295
+ <option value="YE">Yemen</option>
296
+ <option value="ZR">Zaire</option>
297
+ <option value="ZM">Zambia</option>
298
+ <option value="ZW">Zimbabwe</option>
299
+ </select>
300
+ </fieldset>
301
+
302
+ <%= f.submit t('admin.users.new.create_link'), id: "save-account" %>
16
303
  <% end %>
17
304
 
18
305
  <%= render :partial => "citygate/shared/navigation" %>