Cleanup the signup_status admin UI and provide status weights
| Project: | Signup Status |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | task |
| Priority: | normal |
| Assigned: | dww |
| Status: | closed |
Working with admin/settings/signup_status leaves a lot to be desired. ;) I'd like to fix it in the following ways:
A) There's no notion of a status weight, so there's no way to re-order the status options anywhere in the UI.
B) There's no easy way to edit multiple status at once. For example, if you have 10 status options and you want to mark N of them so that they don't appear on the signup form, you have to click 3*N times (with N page loads), instead of N+1 clicks with no page load.
So, I'd like to make admin/settings/signup_status itself be a tabledrag form, with a weight column, all of the things listed there as text fields (name, description) or drop-downs (modify signup count, show on signup form), remove the "edit" links, and add a blank row at the bottom for adding a new status...

#1
Pretty easy patch. I'm attaching screenshots of the new UI, plus a few screenies of the existing UI for comparison.
#2
The patch applies cleanly and the schema updates executed without issue.
I tested out the UI and I experienced no errors or bugs.
Awesome UI improvement. It'll be a breeze setting up and modifying signup statuses with this UI, and the concept of weight is great to have.
If a default status ala #503368: Default Status on Signup is eventually worked into the UI, these changes will make it a lot easier to work with, too.
#3
This is a great improvement. Quick (low priority) question: Is it possible to modify the machine-readable name of the signup statuses anywhere?
#4
Thanks for the reviews! Committed to HEAD.
ezra-g: There's no machine-readable name of the status. There's only a serial DB column for the status id, then the 'Name' field. As far as I can tell, the description isn't used anywhere in the code -- not sure what the intention is there. That's part of why I didn't care about making it a shorter text field instead of a multi-line text area. On the project issue status setting page UI (which I based this heavily on), the numeric status code is displayed (readonly) in the UI -- however, that's because there were times when the status code was actually visible in the UI (e.g. in GET params to issue queue queries), so I figured it was worth displaying there. In this case, no human ever needs to know what numeric status ID corresponds to any given status, so I just left it out.
#5
Playing with this a bit more, I wanted to add some help text (especially in light of #581826: Fix status "modify signup count" code to actually do something). I also wanted to visually handle the required form elements better, since it was a bit clunky before. It's a wee bit of a hack, but if you define the #title attributes on the form elements in the form builder, but unset them during the theme function when rendering the rows in the table, the table still looks normal, but form validation errors have the right wording. And, I just lifted the span used by core's theme_form_element() when marking required form fields and used that in the table header over the Name column. I think that works pretty well.
Attached patch implements the fixes, and screenshots showing off various aspects. There's also a "before" screenshot of how the code currently in HEAD looks when you try to set an existing status to a blank name...
p.s. It would potentially be nice if core provided that marker in its own theme function, see #582584: Move required form element marker into its own theme function if you're interested. ;)
#6
Works as advertised. I like the addition of help text.
#7
Based on a little more IRC discussion, we decided to add a line explaining why the order in this table matters. The help text is now:
Committed to HEAD.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.