Add author updated feature to submission#4380
Conversation
frjo
left a comment
There was a problem hiding this comment.
Works well but can be simplified I think.
| label=_("Applicants"), | ||
| required=False, | ||
| ) | ||
| author.widget.attrs.update({"data-placeholder": "Select..."}) |
There was a problem hiding this comment.
Can we make this author.widget.attrs.update({"data-placeholder": "Select...", "data-js-choices": ""})?
| allowHTML: true, | ||
| }); | ||
| }); | ||
| </script> |
There was a problem hiding this comment.
With setting data-js-choices above I believe this script snippet is not needed.
|
|
||
| {% url 'funds:submissions:change_author' pk=object.pk as author_update_url %} | ||
| {% include 'funds/includes/dialog_form_base.html' with form=form value=value %} | ||
| </form> |
There was a problem hiding this comment.
The "lead" modal is much simpler, no form in form. Here there seems to be two htmx calls, is that needed?
I see that the partner modal looks like above, I suspect that is overcomplicated as well.
| </dl> | ||
| </div> | ||
|
|
||
| {% url 'funds:submissions:change_author' pk=object.pk as author_update_url %} |
There was a problem hiding this comment.
I do not think this is used anywhere.
319770d to
78224f8
Compare
4779c15 to
5561272
Compare
5561272 to
f1b3c07
Compare
|
@frjo if you have the capacity can you review this? gotten lots of requests for this feature lately. Will likely add unit tests but otherwise feels pretty good to go. would eventually love to add emails to the choice options so staff doesn't only need to rely on the display name Almost wondering if we should move the update author button to this |
| class UpdateAuthorView(View): | ||
| model = ApplicationSubmission | ||
| form_class = UpdateAuthorForm | ||
| context_name = "author_form" |
There was a problem hiding this comment.
I do not think this is actually used anywhere. Same for "UpdateLeadView".
There was a problem hiding this comment.
As in the view itself isn't used anywhere? or the context_name
There was a problem hiding this comment.
confirmed it's not used, should be set now
|
thanks for the flags @frjo! couple of issues were existing that I glazed over when I revived the PR |
|
Regarding the "Edit" link, could we make the Legal name itself into a link, for staff only, to the wagtail admin user page? Then we can remove the separate "Edit" link. |

Fixes #4192
Staff can update the submission's author. Flow is similar to the Lead update but the button is a bit hidden in more actions.
Test Steps