Commit 95e6a5dc authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix admin forms UI

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f1266765
%h3.page-title Edit Group
%hr
= form_for [:admin, @group] do |f|
= form_for [:admin, @group], html: { class: "form-horizontal" } do |f|
- if @group.errors.any?
.alert.alert-danger
%span= @group.errors.full_messages.first
.form-group.group_name_holder
= f.label :name do
= f.label :name, class: 'control-label' do
Group name
.col-sm-10
= f.text_field :name, placeholder: "Example Group", class: "form-control"
.form-group.group-description-holder
= f.label :description, "Details"
= f.label :description, "Details", class: 'control-label'
.col-sm-10
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
.form-group.group_name_holder
= f.label :path do
= f.label :path, class: 'control-label' do
%span.cred Group path
.col-sm-10
= f.text_field :path, placeholder: "example-group", class: "form-control danger"
......
%h3.page-title New Group
%hr
= form_for [:admin, @group] do |f|
= form_for [:admin, @group], html: { class: 'group-form form-horizontal' } do |f|
- if @group.errors.any?
.alert.alert-danger
%span= @group.errors.full_messages.first
.form-group
= f.label :name do
= f.label :name, class: 'control-label' do
Group name
.col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left"
= f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"
.form-group.group-description-holder
= f.label :description, "Details"
= f.label :description, "Details", class: 'control-label'
.col-sm-10
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
.form-group
.col-sm-2
.col-sm-10
%ul
%li A group is a collection of several projects
%li Groups are private by default
%li Members of a group may only view projects they have permission to access
%li Group project URLs are prefixed with the group namespace
%li Existing projects may be moved into a group
.form-actions
= f.submit 'Create group', class: "btn btn-create"
%hr
.padded
%ul
%li Group is kind of directory for several projects
%li All created groups are private
%li People within a group see only projects they have access to
%li All projects of group will be stored in a group directory
%li You will be able to move existing projects into group
.user_new
= form_for [:admin, @user] do |f|
= form_for [:admin, @user], html: { class: 'form-horizontal' } do |f|
-if @user.errors.any?
#error_explanation
%ul.unstyled.alert.alert-danger
......@@ -9,26 +9,26 @@
%fieldset
%legend Account
.form-group
= f.label :name
= f.label :name, class: 'control-label'
.col-sm-10
= f.text_field :name, required: true, autocomplete: "off"
= f.text_field :name, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
.form-group
= f.label :username
= f.label :username, class: 'control-label'
.col-sm-10
= f.text_field :username, required: true, autocomplete: "off"
= f.text_field :username, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
.form-group
= f.label :email
= f.label :email, class: 'control-label'
.col-sm-10
= f.text_field :email, required: true, autocomplete: "off"
= f.text_field :email, required: true, autocomplete: "off", class: 'form-control'
%span.help-inline * required
- if @user.new_record?
%fieldset
%legend Password
.form-group
= f.label :password
= f.label :password, class: 'control-label'
.col-sm-10
%strong
A temporary password will be generated and sent to user.
......@@ -38,29 +38,25 @@
%fieldset
%legend Password
.form-group
= f.label :password
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password
= f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
.form-group
= f.label :password_confirmation
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password
= f.label :password_confirmation, class: 'control-label'
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
%fieldset
%legend Access
.row
.col-md-8
.form-group
= f.label :projects_limit
.col-sm-10= f.number_field :projects_limit
= f.label :projects_limit, class: 'control-label'
.col-sm-10= f.number_field :projects_limit, class: 'form-control'
.form-group
= f.label :can_create_group
= f.label :can_create_group, class: 'control-label'
.col-sm-10= f.check_box :can_create_group
.form-group
= f.label :admin do
%strong.cred Administrator
= f.label :admin, class: 'control-label'
.col-sm-10= f.check_box :admin
.col-md-4
- unless @user.new_record?
.alert.alert-danger
- if @user.blocked?
......@@ -72,14 +68,14 @@
%fieldset
%legend Profile
.form-group
= f.label :skype
.col-sm-10= f.text_field :skype
= f.label :skype, class: 'control-label'
.col-sm-10= f.text_field :skype, class: 'form-control'
.form-group
= f.label :linkedin
.col-sm-10= f.text_field :linkedin
= f.label :linkedin, class: 'control-label'
.col-sm-10= f.text_field :linkedin, class: 'form-control'
.form-group
= f.label :twitter
.col-sm-10= f.text_field :twitter
= f.label :twitter, class: 'control-label'
.col-sm-10= f.text_field :twitter, class: 'form-control'
.form-actions
- if @user.new_record?
......
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