Commit Graph

37 Commits

Author SHA1 Message Date
evazion
d7ac57f1e5 artists: sort URLs in edit form. 2022-02-14 00:33:50 -06:00
evazion
52d76a4f22 artists: fix error messages for invalid artist names.
* When trying to create an artist entry for a non-artist tag, set the
  error on the name attribute so that the artist name gets marked
  as incorrect in the artist edit form.

* Fix a bad `Name '' cannot be blank` error message when the artist name
  is blank.

* Fix showing wiki pages of non-artist tags in the artist edit form when
  the artist name conflicts with a non-artist tag (e.g. if you try to
  create an artist named '1girl', don't show the wiki for 1girl in the
  artist edit form).
2021-03-07 21:07:44 -06:00
evazion
b8d95ace64 css: adjust form input box sizes.
Adjust input boxes to fit the screen better on mobile, and to use
consistent sizes throughout the site (no ad-hoc overrides to make
certain input boxes a bit bigger in random places).

On desktop, this makes most input boxes a bit taller and narrower. On
mobile, it makes input boxes the full width of the screen.

This most notably affects the tag edit box, the comment and forum
post box, the wiki page edit box, and the commentary box.
2021-02-16 09:28:38 -06:00
evazion
ca00563a4d Fix #4303: Unable to rename artist entries with wiki pages
Remove the ability to edit an artist's wiki page directly from the
artist edit page. Instead the artist edit page has a link to open the
wiki edit page if you need to edit the wiki too.

Fixes an error being thrown when renaming an artist with a wiki page.
The problem is that changing the artist's name breaks the artist's
association with the old wiki page. Rails really wants nested
associations to be based on immutable IDs, not on mutable names, so
dealing with this correctly is difficult.

We don't really want to encourage people to create wiki pages for
artists to begin with, since they're usually just used to duplicate
the artist urls. Making it less convenient to edit artist wiki pages is
an intentional change to discourage creating unnecessary artist wikis.

Finally, this fixes an exploit where it was possible to edit locked wiki
pages through the artist edit page.
2020-05-12 16:57:05 -05:00
evazion
ef3188a7fe artists/edit: refactor editing nested wiki pages.
Refactor to use accepts_nested_attributes_for instead of the notes
attribute to facilitate editing wikis on the artist edit page.

This fixes the notes attribute unintentionally showing up in the API.

This also changes it so that renaming an artist entry doesn't
automatically rename the corresponding wiki page. This had bad behavior
when there was a conflict between wiki pages (the wikis would be
silently merged, which usually isn't what you want). It also didn't warn
about wiki links being broken by renames.
2020-02-16 18:48:41 -06:00
evazion
c86c61c9a4 Fix #4162: Remove browser autocomplete from most inputs. 2020-01-10 16:08:34 -06:00
evazion
fff4e3badd artists: allow members to rename, delete, and undelete artists.
Also allow Members to edit deleted or banned artists. Previously this
was limited in the html, but not in the backend.
2019-12-16 19:42:10 -06:00
evazion
49d38d6256 views: fix positioning of form hints.
Position <span class="hint"> elements to the right of normal <input>
elements and underneath <textarea> elements. Fixes form hints being
badly positioned on some pages.
2019-09-10 14:30:49 -05:00
evazion
6e708dec18 /artists/new: fix artist name input box sizing.
In production the name input is really big because the artist name
column in the production db is `text` rather than `character varying`,
and simpleform treats text columns as textbox inputs.
2019-08-19 19:49:31 -05:00
evazion
e85c6c3250 artists.js: replace 'check name' code with tag autocomplete.
Instead of having custom code check whether the artist name is already
in use, just enable autocomplete on the artist name field. This is an
easier and more robust way to indicate tag name conflicts.
2019-08-15 12:51:51 -05:00
evazion
0dd44e64a4 artists: add notice about separating other names with spaces (#4028). 2018-12-27 15:03:11 -06:00
evazion
41ff05c121 artists: convert other_names to array (#3987). 2018-11-15 14:31:16 -06:00
r888888888
97887a3241 fixes #3725 2018-05-26 13:04:08 -07:00
Albert Yi
0e7349ca48 fix xss vuln 2018-05-22 14:48:00 -07:00
evazion
2c46191f99 artists: fix edit form fields not being prefilled.
* Fix the artist URLs field not being prefilled when clicking
  "Create new artist" in the "Fetch source data" box.

* Fix the artist name field not being prefilled when clicking
  "Create new artist entry" on the /artists/show_or_new?name=<name> page.
2018-04-14 21:26:45 -05:00
Albert Yi
06559c4ae4 fix missing urls in artists (fixes #3632) 2018-04-13 12:25:49 -07:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
Albert Yi
2a5343b8cf add more intelligent js for artist forms 2016-10-18 14:56:40 -07:00
Type-kun
a7d553038f Add "disable-with" to most edit forms (should fix #2264) 2016-08-30 22:54:38 +05:00
Toks
198ab5f2d1 Add hint for renaming wikis/artists 2014-06-25 11:32:23 -04:00
Toks
11871d88b6 fixes #1844
closes #1653
2013-10-26 00:08:37 -04:00
Toks
6f2d57882e fixes #1672 2013-06-05 13:09:14 -04:00
r888888888
4dff618863 Use webmock instead of fakeweb for VCR; Fix tests; Use Timecop to speed up tests previously using sleep; Move artist rename into seperate operation 2013-05-24 12:59:13 -07:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
ea5c5b2a03 fixes #1292 2013-04-22 21:00:38 -04:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
c62b8ee46e fixes #547 2013-02-23 12:36:45 -05:00
albert
6bc5b96d8e moved artist ban to separate action/button 2013-02-23 10:56:27 -05:00
albert
ab52b40c02 fix artist other names 2013-02-20 13:58:37 -05:00
albert
dec514fe2b hide is banned option for artists for non-admins 2011-12-30 15:19:00 -05:00
albert
dec55010a6 fixes #195 2011-12-29 17:51:09 -05:00
albert
0eb665af0d refactored dtext field helper 2011-10-21 17:45:49 -04:00
albert
e8808987d5 unified js for dtext previews 2011-10-20 18:50:16 -04:00
albert
f630365c3b style fixes 2011-10-17 00:39:22 -04:00
albert
e507f3dfd1 added artist ban capability 2011-10-16 22:28:56 -04:00
albert
cb3d7e9e9b changes 2010-10-08 19:07:47 -04:00
albert
f051e04550 sync 2010-10-08 18:42:26 -04:00