11656fd423
Factor choose group avatar button
27 lines
935 B
Text
27 lines
935 B
Text
= form_for @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, class: 'control-label' do
|
|
Group name
|
|
.col-sm-10
|
|
= f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control", tabindex: 1, autofocus: true
|
|
|
|
.form-group.group-description-holder
|
|
= f.label :description, "Details", class: 'control-label'
|
|
.col-sm-10
|
|
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4, tabindex: 2
|
|
|
|
.form-group.group-description-holder
|
|
= f.label :avatar, "Group avatar", class: 'control-label'
|
|
.col-sm-10
|
|
= render 'shared/choose_group_avatar_button', f: f
|
|
|
|
.form-group
|
|
.col-sm-2
|
|
.col-sm-10
|
|
= render 'shared/group_tips'
|
|
|
|
.form-actions
|
|
= f.submit 'Create group', class: "btn btn-create", tabindex: 3
|