Commit 1af2aeff authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Minor usability improvements

parent a769662f
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
%li It will change the git path to repositories under this group. %li It will change the git path to repositories under this group.
.form-actions .form-actions
= f.submit 'Edit group', class: "btn btn-remove" = f.submit 'Save changes', class: "btn btn-primary"
= link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
.form-actions .form-actions
= f.submit 'Create group', class: "btn btn-primary" = f.submit 'Create group', class: "btn btn-create"
%hr %hr
.padded .padded
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
%td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"} %td= select_tag :project_access, options_for_select(Project.access_options), {class: "project-access-select chosen span3"}
%tr %tr
%td= submit_tag 'Add user to projects in group', class: "btn btn-primary" %td= submit_tag 'Add user to projects in group', class: "btn btn-create"
%td %td
Read more about project permissions Read more about project permissions
%strong= link_to "here", help_permissions_path, class: "vlink" %strong= link_to "here", help_permissions_path, class: "vlink"
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
.input .input
= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
.form-actions .form-actions
= submit_tag 'Add', class: "btn btn-primary" = submit_tag 'Move projects', class: "btn btn-create"
:javascript :javascript
$(function(){ $(function(){
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.input .input
= f.text_field :url, class: "text_field xxlarge" = f.text_field :url, class: "text_field xxlarge"
   
= f.submit "Add System Hook", class: "btn btn-primary" = f.submit "Add System Hook", class: "btn btn-create"
%hr %hr
-if @hooks.any? -if @hooks.any?
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
= f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4
.form-actions .form-actions
= f.submit 'Create team', class: "btn btn-primary" = f.submit 'Create team', class: "btn btn-create"
%hr %hr
.padded .padded
......
...@@ -80,8 +80,9 @@ ...@@ -80,8 +80,9 @@
.input= f.text_field :twitter .input= f.text_field :twitter
.actions .actions
= f.submit 'Save', class: "btn btn-save"
- if @admin_user.new_record? - if @admin_user.new_record?
= f.submit 'Create user', class: "btn btn-create"
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel" = link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
- else - else
= f.submit 'Save changes', class: "btn btn-save"
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel" = link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel"
...@@ -30,11 +30,11 @@ describe "Admin::Users" do ...@@ -30,11 +30,11 @@ describe "Admin::Users" do
end end
it "should create new user" do it "should create new user" do
expect { click_button "Save" }.to change {User.count}.by(1) expect { click_button "Create user" }.to change {User.count}.by(1)
end end
it "should create user with valid data" do it "should create user with valid data" do
click_button "Save" click_button "Create user"
user = User.last user = User.last
user.name.should == "Big Bang" user.name.should == "Big Bang"
user.email.should == "bigbang@mail.com" user.email.should == "bigbang@mail.com"
...@@ -44,14 +44,14 @@ describe "Admin::Users" do ...@@ -44,14 +44,14 @@ describe "Admin::Users" do
Notify.should_receive(:new_user_email) Notify.should_receive(:new_user_email)
User.observers.enable :user_observer do User.observers.enable :user_observer do
click_button "Save" click_button "Create user"
end end
end end
it "should send valid email to user with email & password" do it "should send valid email to user with email & password" do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(false) Gitlab.config.gitlab.stub(:signup_enabled).and_return(false)
User.observers.enable :user_observer do User.observers.enable :user_observer do
click_button "Save" click_button "Create user"
user = User.last user = User.last
email = ActionMailer::Base.deliveries.last email = ActionMailer::Base.deliveries.last
email.subject.should have_content("Account was created") email.subject.should have_content("Account was created")
...@@ -63,7 +63,7 @@ describe "Admin::Users" do ...@@ -63,7 +63,7 @@ describe "Admin::Users" do
it "should send valid email to user with email without password when signup is enabled" do it "should send valid email to user with email without password when signup is enabled" do
Gitlab.config.gitlab.stub(:signup_enabled).and_return(true) Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
User.observers.enable :user_observer do User.observers.enable :user_observer do
click_button "Save" click_button "Create user"
user = User.last user = User.last
email = ActionMailer::Base.deliveries.last email = ActionMailer::Base.deliveries.last
email.subject.should have_content("Account was created") email.subject.should have_content("Account was created")
...@@ -102,7 +102,7 @@ describe "Admin::Users" do ...@@ -102,7 +102,7 @@ describe "Admin::Users" do
fill_in "user_name", with: "Big Bang" fill_in "user_name", with: "Big Bang"
fill_in "user_email", with: "bigbang@mail.com" fill_in "user_email", with: "bigbang@mail.com"
check "user_admin" check "user_admin"
click_button "Save" click_button "Save changes"
end end
it "should show page with new data" do it "should show page with new data" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment