Unverified Commit 16eb3ac3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Update form classes


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c0fa37704476
......@@ -32,34 +32,6 @@ form {
}
}
input.input-xpadding,
.add-on.input-xpadding {
padding: 6px 10px;
}
.control-group {
@extend .form-group;
.control-label {
padding-top: 6px;
}
.controls {
@extend .col-sm-10;
input, textarea {
padding: 6px 10px;
}
input[type="radio"], input[type="checkbox"] {
margin-top: 6px;
}
.add-on {
padding: 6px;
}
}
}
input[type='search'].search-text-input {
background-image: url("icon-search.png");
background-repeat: no-repeat;
......@@ -77,7 +49,6 @@ input[type='text'].danger {
fieldset legend {
font-size: 16px;
margin-bottom: 10px;
}
.datetime-controls {
......
......@@ -17,7 +17,7 @@
legend {
border: none;
margin: 0;
margin-bottom: 10px;
}
}
}
......
......@@ -11,30 +11,30 @@
.alert.alert-error
- @broadcast_message.errors.full_messages.each do |msg|
%p= msg
.control-group
.form-group
= f.label :message
.controls
.col-sm-10
= f.text_area :message, class: "input-xxlarge", rows: 2, required: true
%div
= link_to '#', class: 'js-toggle-colors-link' do
Customize colors
.control-group.js-toggle-colors-container.gl-hide
.form-group.js-toggle-colors-container.gl-hide
= f.label :color, "Background Color"
.controls
.col-sm-10
= f.text_field :color, placeholder: "#AA33EE"
.light Hex values as 3 double digit numbers, starting with a # sign.
.control-group.js-toggle-colors-container.gl-hide
.form-group.js-toggle-colors-container.gl-hide
= f.label :font, "Font Color"
.controls
.col-sm-10
= f.text_field :font, placeholder: "#224466"
.light Hex values as 3 double digit numbers, starting with a # sign.
.control-group
.form-group
= f.label :starts_at
.controls.datetime-controls
.col-sm-10.datetime-controls
= f.datetime_select :starts_at
.control-group
.form-group
= f.label :ends_at
.controls.datetime-controls
.col-sm-10.datetime-controls
= f.datetime_select :ends_at
.form-actions
= f.submit "Add broadcast message", class: "btn btn-create"
......
......@@ -4,21 +4,21 @@
- if @group.errors.any?
.alert.alert-error
%span= @group.errors.full_messages.first
.control-group.group_name_holder
.form-group.group_name_holder
= f.label :name do
Group name
.controls
.col-sm-10
= f.text_field :name, placeholder: "Example Group", class: "input-xxlarge"
.control-group.group-description-holder
.form-group.group-description-holder
= f.label :description, "Details"
.controls
.col-sm-10
= f.text_area :description, maxlength: 250, class: "input-xxlarge js-gfm-input", rows: 4
.control-group.group_name_holder
.form-group.group_name_holder
= f.label :path do
%span.cred Group path
.controls
.col-sm-10
= f.text_field :path, placeholder: "example-group", class: "input-xxlarge danger"
%ul.cred
%li Changing group path can have unintended side effects.
......
......@@ -4,14 +4,14 @@
- if @group.errors.any?
.alert.alert-error
%span= @group.errors.full_messages.first
.control-group
.form-group
= f.label :name do
Group name
.controls
.col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "input-xxlarge left"
.control-group.group-description-holder
.form-group.group-description-holder
= f.label :description, "Details"
.controls
.col-sm-10
= f.text_area :description, maxlength: 250, class: "input-xxlarge js-gfm-input", rows: 4
.form-actions
......
......@@ -13,9 +13,9 @@
.alert.alert-error
- @hook.errors.full_messages.each do |msg|
%p= msg
.control-group
.form-group
= f.label :url, "URL:"
.controls
.col-sm-10
= f.text_field :url, class: "text_field input-xxlarge input-xpadding"
&nbsp;
= f.submit "Add System Hook", class: "btn btn-create"
......
......@@ -2,32 +2,32 @@
.col-md-4
.admin-filter
= form_tag admin_projects_path, method: :get, class: 'form-inline' do
.control-group
.form-group
= label_tag :name, 'Name:', class: 'control-label'
.controls
.col-sm-10
= text_field_tag :name, params[:name], class: "span2"
.control-group
.form-group
= label_tag :owner_id, 'Owner:', class: 'control-label'
.controls
.col-sm-10
= users_select_tag :owner_id, selected: params[:owner_id], class: 'input-large input-clamp'
.control-group.visibility-levels
.form-group.visibility-levels
= label_tag :visibility_level, 'Visibility Levels', class: 'control-label'
- Project.visibility_levels.each do |label, level|
.controls
.col-sm-10
= check_box_tag 'visibility_levels[]', level, params[:visibility_levels].present? && params[:visibility_levels].include?(level.to_s)
%span.descr
= visibility_level_icon(level)
= label
.control-group
.form-group
= label_tag :with_push, 'Not empty', class: 'control-label'
.controls
.col-sm-10
= check_box_tag :with_push, 1, params[:with_push]
&nbsp;
%span.light Projects with push events
.control-group
.form-group
= label_tag :abandoned, 'Abandoned', class: 'control-label'
.controls
.col-sm-10
= check_box_tag :abandoned, 1, params[:abandoned]
&nbsp;
%span.light No activity over 6 month
......
......@@ -80,13 +80,13 @@
Transfer project
.body
= form_for @project, url: transfer_admin_project_path(@project), method: :put do |f|
.control-group
.form-group
= f.label :namespace_id, "Namespace"
.controls
.col-sm-10
= namespace_select_tag :namespace_id, selected: params[:namespace_id], class: 'input-large'
.control-group
.controls
.form-group
.col-sm-10
= f.submit 'Transfer', class: 'btn btn-primary'
.col-md-6
......
......@@ -8,28 +8,28 @@
%fieldset
%legend Account
.control-group
.form-group
= f.label :name
.controls
.col-sm-10
= f.text_field :name, required: true, autocomplete: "off"
%span.help-inline * required
.control-group
.form-group
= f.label :username
.controls
.col-sm-10
= f.text_field :username, required: true, autocomplete: "off"
%span.help-inline * required
.control-group
.form-group
= f.label :email
.controls
.col-sm-10
= f.text_field :email, required: true, autocomplete: "off"
%span.help-inline * required
- if @user.new_record?
%fieldset
%legend Password
.control-group
.form-group
= f.label :password
.controls
.col-sm-10
%strong
A temporary password will be generated and sent to user.
%br
......@@ -37,29 +37,29 @@
- else
%fieldset
%legend Password
.control-group
.form-group
= f.label :password
.controls= f.password_field :password, disabled: f.object.force_random_password
.control-group
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password
.form-group
= f.label :password_confirmation
.controls= f.password_field :password_confirmation, disabled: f.object.force_random_password
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password
%fieldset
%legend Access
.row
.col-md-8
.control-group
.form-group
= f.label :projects_limit
.controls= f.number_field :projects_limit
.col-sm-10= f.number_field :projects_limit
.control-group
.form-group
= f.label :can_create_group
.controls= f.check_box :can_create_group
.col-sm-10= f.check_box :can_create_group
.control-group
.form-group
= f.label :admin do
%strong.cred Administrator
.controls= f.check_box :admin
.col-sm-10= f.check_box :admin
.col-md-4
- unless @user.new_record?
.alert.alert-error
......@@ -71,15 +71,15 @@
= link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
%fieldset
%legend Profile
.control-group
.form-group
= f.label :skype
.controls= f.text_field :skype
.control-group
.col-sm-10= f.text_field :skype
.form-group
= f.label :linkedin
.controls= f.text_field :linkedin
.control-group
.col-sm-10= f.text_field :linkedin
.form-group
= f.label :twitter
.controls= f.text_field :twitter
.col-sm-10= f.text_field :twitter
.form-actions
- if @user.new_record?
......
......@@ -6,14 +6,14 @@
group
%p 1. Choose users you want in the group
.control-group
.form-group
= f.label :user_ids, "People"
.controls= users_select_tag(:user_ids, multiple: true, class: 'input-large')
.col-sm-10= users_select_tag(:user_ids, multiple: true, class: 'input-large')
%p 2. Set access level for them
.control-group
.form-group
= f.label :group_access, "Group Access"
.controls= select_tag :group_access, options_for_select(UsersGroup.group_access_roles, @users_group.group_access), class: "project-access-select chosen"
.col-sm-10= select_tag :group_access, options_for_select(UsersGroup.group_access_roles, @users_group.group_access), class: "project-access-select chosen"
.form-actions
= f.submit 'Add users into group', class: "btn btn-create"
......
......@@ -24,15 +24,15 @@
- if @group.errors.any?
.alert.alert-error
%span= @group.errors.full_messages.first
.control-group
.form-group
= f.label :name do
Group name
.controls
.col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "input-xxlarge left"
.control-group.group-description-holder
.form-group.group-description-holder
= f.label :description, "Details"
.controls
.col-sm-10
= f.text_area :description, maxlength: 250, class: "input-xxlarge js-gfm-input", rows: 4
.form-actions
......
......@@ -2,19 +2,19 @@
- if @group.errors.any?
.alert.alert-error
%span= @group.errors.full_messages.first
.control-group
.form-group
= f.label :name do
Group name
.controls
.col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "input-xxlarge left"
.control-group.group-description-holder
.form-group.group-description-holder
= f.label :description, "Details"
.controls
.col-sm-10
= f.text_area :description, maxlength: 250, class: "input-xxlarge js-gfm-input", rows: 4
.control-group
.controls
.form-group
.col-sm-10
%ul
%li A group is a collection of several projects
%li Groups are private by default
......
......@@ -6,12 +6,12 @@
- @key.errors.full_messages.each do |msg|
%li= msg
.control-group
.form-group
= f.label :title
.controls= f.text_field :title, class: "input-xlarge"
.control-group
.col-sm-10= f.text_field :title, class: "input-xlarge"
.form-group
= f.label :key
.controls
.col-sm-10
%p.light
Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_ssh_path}.
= f.text_area :key, class: "input-xxlarge thin_area"
......
......@@ -14,19 +14,19 @@
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.control-group
.form-group
= f.label :current_password
.controls
.col-sm-10
= f.password_field :current_password, required: true
%div
= link_to "Forgot your password?", reset_profile_password_path, method: :put
.control-group
.form-group
= f.label :password, 'New password'
.controls= f.password_field :password, required: true
.control-group
.col-sm-10= f.password_field :password, required: true
.form-group
= f.label :password_confirmation
.controls
.col-sm-10
= f.password_field :password_confirmation, required: true
.form-actions
= f.submit 'Save password', class: "btn btn-save"
......@@ -10,13 +10,13 @@
- @user.errors.full_messages.each do |msg|
%li= msg
.control-group
.form-group
= f.label :password
.controls= f.password_field :password, required: true
.control-group
.col-sm-10= f.password_field :password, required: true
.form-group
= f.label :password_confirmation
.controls
.col-sm-10
= f.password_field :password_confirmation, required: true
.control-group
.controls
.form-group
.col-sm-10
= f.submit 'Set new password', class: "btn btn-create"
......@@ -16,15 +16,15 @@
%li= msg
.row
.col-md-7
.control-group
.form-group
= f.label :name, class: "control-label"
.controls
.col-sm-10
= f.text_field :name, class: "input-xlarge", required: true
%span.help-block Enter your name, so people you know can recognize you.
.control-group
.form-group
= f.label :email, class: "control-label"
.controls
.col-sm-10
- if @user.ldap_user?
= f.text_field :email, class: "input-xlarge", required: true, readonly: true
%span.help-block.light
......@@ -37,18 +37,18 @@
%strong #{@user.unconfirmed_email}
- else
%span.help-block We also use email for avatar detection if no avatar is uploaded.
.control-group
.form-group
= f.label :skype, class: "control-label"
.controls= f.text_field :skype, class: "input-xlarge"
.control-group
.col-sm-10= f.text_field :skype, class: "input-xlarge"
.form-group
= f.label :linkedin, class: "control-label"
.controls= f.text_field :linkedin, class: "input-xlarge"
.control-group
.col-sm-10= f.text_field :linkedin, class: "input-xlarge"
.form-group
= f.label :twitter, class: "control-label"
.controls= f.text_field :twitter, class: "input-xlarge"
.control-group
.col-sm-10= f.text_field :twitter, class: "input-xlarge"
.form-group
= f.label :bio, class: "control-label"
.controls
.col-sm-10
= f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250
%span.help-block Tell us about yourself in fewer than 250 characters.
......
.control-group.project-visibility-level-holder
.form-group.project-visibility-level-holder
= f.label :visibility_level do
Visibility Level
= link_to "(?)", help_public_access_path
- if can_change_visibility_level
- Gitlab::VisibilityLevel.values.each do |level|
- restricted = restricted_visibility_levels.include?(level)
.controls
.col-sm-10
= f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted
%span.descr{:class => ("restricted" if restricted)}
= label :project_visibility_level, level do
......@@ -14,11 +14,11 @@
= visibility_level_label(level)
.light= visibility_level_description(level)
- unless restricted_visibility_levels.empty?
.controls
.col-sm-10
%span.info
Some visibility level settings have been restricted by the administrator.
- else
.controls
.col-sm-10
%span.info
= visibility_level_icon(visibility_level)
%strong
......
......@@ -8,12 +8,12 @@
.modal-body
= form_tag project_blob_path(@project, @id), method: :delete do
.control-group.commit_message-group
.form-group.commit_message-group
= label_tag 'commit_message', class: "control-label" do
Commit message
.controls
.col-sm-10
= text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3
.control-group
.controls
.form-group
.col-sm-10
= submit_tag 'Remove file', class: 'btn btn-remove'
= link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
......@@ -2,13 +2,13 @@
%i.icon-code-fork
New branch
= form_tag project_branches_path, method: :post do
.control-group
.form-group
= label_tag :branch_name, 'Name for new branch', class: 'control-label'
.controls
.col-sm-10
= text_field_tag :branch_name, nil, placeholder: 'feature/dashboard', required: true, tabindex: 1
.control-group
.form-group
= label_tag :ref, 'Create from', class: 'control-label'
.controls
.col-sm-10
= text_field_tag :ref, nil, placeholder: 'master', required: true, tabindex: 2
.light branch name or commit SHA
.form-actions
......
......@@ -49,7 +49,7 @@
%img{src: "data:#{old_file.mime_type};base64,#{Base64.encode64(old_file.data)}"}
.frame.added
%img{src: "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
.controls
.col-sm-10
.transparent
.drag-track
.dragger{:style => "left: 0px;"}
......
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