diff --git a/app/views/admin/form_answers/company_details/_user_accounts.html.slim b/app/views/admin/form_answers/company_details/_user_accounts.html.slim index bfd565ab0..84a4de18c 100644 --- a/app/views/admin/form_answers/company_details/_user_accounts.html.slim +++ b/app/views/admin/form_answers/company_details/_user_accounts.html.slim @@ -1,8 +1,4 @@ .form-group .form-container label.form-label User accounts - = render "admin/form_answers/collaborators/list" - - - if policy(resource).can_add_collaborators_to_application? - = render "admin/form_answers/collaborators/form" diff --git a/app/views/admin/users/_fields_collaborators.html.slim b/app/views/admin/users/_fields_collaborators.html.slim index 3816ed319..cd90f2041 100644 --- a/app/views/admin/users/_fields_collaborators.html.slim +++ b/app/views/admin/users/_fields_collaborators.html.slim @@ -11,3 +11,5 @@ br p.p-empty This user has not added any collaborators. br + += render "admin/form_answers/collaborators/form", resource: resource diff --git a/app/views/admin/users/_form.html.slim b/app/views/admin/users/_form.html.slim index d527262e3..78d3ec1dc 100644 --- a/app/views/admin/users/_form.html.slim +++ b/app/views/admin/users/_form.html.slim @@ -28,16 +28,6 @@ .panel-body = render "fields_contact_preferences", f: f - - unless action_name == "new" - .panel.panel-default[data-controller="element-focus"] - .panel-heading id="section-collaborators-header" - h2.panel-title - a.collapsed data-toggle="collapse" data-parent="#user-form-panel" href="#section-collaborators" aria-expanded="false" aria-controls="section-collaborators" data-element-focus-target="reveal" - ' Collaborators - #section-collaborators.section-collaborators.panel-collapse.collapse[aria-labelledby="section-collaborators-header" data-element-scroll-target="accordion"] - .panel-body - = render "fields_collaborators", f: f, resource: resource - br .clearfix .pull-right diff --git a/app/views/admin/users/edit.html.slim b/app/views/admin/users/edit.html.slim index fb5c4e9ad..f757d63c2 100644 --- a/app/views/admin/users/edit.html.slim +++ b/app/views/admin/users/edit.html.slim @@ -3,3 +3,12 @@ = "Edit #{controller_name == "users" ? "applicant" : controller_name.singularize}" = render 'form', resource: @resource + +.panel.panel-default[data-controller="element-focus"] + .panel-heading id="section-collaborators-header" + h2.panel-title + a.collapsed data-toggle="collapse" data-parent="#user-form-panel" href="#section-collaborators" aria-expanded="false" aria-controls="section-collaborators" data-element-focus-target="reveal" + ' Collaborators + #section-collaborators.section-collaborators.panel-collapse.collapse[aria-labelledby="section-collaborators-header" data-element-scroll-target="accordion"] + .panel-body + = render "fields_collaborators", resource: @resource