haystack / murmur

A mailing list designed to reduce noise and encourage sharing
25 stars 13 forks source link

Friendly group name to display group names with spaces #326

Open angcast opened 3 years ago

angcast commented 3 years ago

Previously, when a person tried to input a group name with spaces, it would not work. Now with this change, this is possible. If a person writes a name with spaces, the name attribute in the Group model will replace the spaces with underscores. Meanwhile, the friendly_name attribute will keep the spaces and use this to display the name with the spaces in the frontend.

soyapark commented 3 years ago

Hi Angie!

I try to hit the "create" button and no matter if I have spaces or not I run into this following error from my web console.

image
[Error] TypeError: $("#group-name").val().replaceAll is not a function. (In '$("#group-name").val().replaceAll(' ','_')', '$("#group-name").val().replaceAll' is undefined)
    (anonymous function) (create_group.js:9)
    dispatch (jquery.min.js:3:8442)
    handle (jquery.min.js:3:5145)
soyapark commented 3 years ago

Also, we might want to say in the interface that space is allowed? https://github.com/haystack/murmur/blob/7261e87f8c2315c3cb18ed1fbd3026f93506bf5e/browser/templates/murmur/edit_create_group.html#L15