diff --git a/app/assets/javascripts/discourse/templates/modal/edit-group.hbs b/app/assets/javascripts/discourse/templates/modal/edit-group.hbs index 0a3ffabd923..60a762eb7e9 100644 --- a/app/assets/javascripts/discourse/templates/modal/edit-group.hbs +++ b/app/assets/javascripts/discourse/templates/modal/edit-group.hbs @@ -1,5 +1,8 @@ {{#d-modal-body title="group.edit.title" class="edit-group groups"}} <form class="form-horizontal"> + <label for='title'>{{i18n 'group.title'}}</label> + {{input type='text' name='title' value=model.title class='edit-group-title'}} + <label for='bio'>{{i18n 'group.bio'}}</label> {{d-editor value=model.bio_raw class="edit-group-bio"}} diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index af7e39e4cca..6c449113ee8 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -173,7 +173,8 @@ class GroupsController < ApplicationController :flair_url, :flair_bg_color, :flair_color, - :bio_raw + :bio_raw, + :title ) end diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 60c676becfd..4255aaa32a6 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1847,6 +1847,7 @@ en: group: edit: title: 'Edit Group' + title: 'Title' name: "Name" bio: "About Group" name_placeholder: "Group name, no spaces, same as username rule" diff --git a/spec/integration/groups_spec.rb b/spec/integration/groups_spec.rb index 4196216c19e..c063e7d78dc 100644 --- a/spec/integration/groups_spec.rb +++ b/spec/integration/groups_spec.rb @@ -47,7 +47,8 @@ describe "Groups" do flair_bg_color: 'FFF', flair_color: 'BBB', flair_url: 'fa-adjust', - bio_raw: 'testing' + bio_raw: 'testing', + title: 'awesome team' } } expect(response).to be_success @@ -58,6 +59,7 @@ describe "Groups" do expect(group.flair_color).to eq('BBB') expect(group.flair_url).to eq('fa-adjust') expect(group.bio_raw).to eq('testing') + expect(group.title).to eq('awesome team') end end diff --git a/test/javascripts/acceptance/groups-test.js.es6 b/test/javascripts/acceptance/groups-test.js.es6 index 1e947da6184..bc6a6ee44a1 100644 --- a/test/javascripts/acceptance/groups-test.js.es6 +++ b/test/javascripts/acceptance/groups-test.js.es6 @@ -49,5 +49,6 @@ test("Admin Browsing Groups", () => { andThen(() => { ok(find('.group-flair-inputs').length === 1, 'it should display avatar flair inputs'); ok(find('.edit-group-bio').length === 1, 'it should display group bio input'); + ok(find('.edit-group-title').length === 1, 'it should display group title input'); }); });