Skip to content

Commit 0e9e13f

Browse files
committed
Merge branch 'chef-840' of git://github.com/btm/chef into btm/chef-840
2 parents 05852f6 + 1c6f3b1 commit 0e9e13f

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

chef-server-webui/app/controllers/clients.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def update
8080
@client.create_keys
8181
@private_key = @client.private_key
8282
end
83-
@client.admin(str_to_bool(params[:admin])) unless params[:admin].nil?
83+
params[:admin] ? @client.admin(true) : @client.admin(false)
8484
@client.save
8585
@_message = @private_key.nil? ? { :notice => "Updated Client" } : { :notice => "Created Client #{@client.name}. Please copy the following private key as the client's validation key." }
8686
render :show

chef-server-webui/app/views/clients/_form.html.haml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
%div.group.form
1616
%label.label Admin
17-
= text_field :id => "client_admin", :name => "admin", :class => "text_field", :value => @client.admin
18-
%span.description Whether or not the Client is an admin
19-
17+
= check_box :id => "client_admin", :name => "admin", :value => "true", :label => "Whether or not the Client is an admin", :checked => @client.admin
18+
2019
= form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do
2120
%div.group
2221
.actions-bar

0 commit comments

Comments
 (0)