From 3a47ed979a62e91fdcd7d05ebb309759788a23b6 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 21 Oct 2014 00:25:44 +0200 Subject: Factor group forms --- app/views/groups/edit.html.haml | 11 +---------- app/views/groups/new.html.haml | 10 +--------- 2 files changed, 2 insertions(+), 19 deletions(-) (limited to 'app/views/groups') diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 0b15affe785..c2fcace8200 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -11,16 +11,7 @@ - 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 left" - - .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 + = render 'shared/group_form', f: f .form-group .col-sm-2 diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 235e299343a..2116d21ac41 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -2,16 +2,8 @@ - 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 + = render 'shared/group_form', f: f, autofocus: true .form-group.group-description-holder = f.label :avatar, "Group avatar", class: 'control-label' -- cgit v1.2.1