[Archivesspace_Users_Group] Missing section id for plugin forms

Brian Hoffman brianjhoffman at gmail.com
Wed Nov 11 12:05:39 EST 2015

This is a horrible short-term solution, but perhaps you could add something like this in a javscript file…but it sounds like the plugin helper needs to be updated.

$(function() {

  var agent_type = window.location.pathname.substr(8).replace(/\/.*/, ‘’);
  $(“#agent_places_”).attr(‘id’, agent_type+”_places_”);


> On Nov 10, 2015, at 5:54 PM, Carlos Lemus <carlos.lemus at unlv.edu> wrote:
> Hello, 
> I'm adding additional forms for the agent records, and on the sidebar the anchor will display something like #agent_family_places_ depending on the parent but the actual section in the record form will have id of id="agent_places_ 
> https://github.com/l3mus/ArchivesSpace-authority-project/tree/master/place <https://github.com/l3mus/ArchivesSpace-authority-project/tree/master/place>
> I think it might be because the agent _forms.html.erb calls 
> <%= form_plugins_for("agent", form) %>
> and that function
>  http://www.rubydoc.info/github/archivesspace/archivesspace/PluginHelper%3Aform_plugins_for <http://www.rubydoc.info/github/archivesspace/archivesspace/PluginHelper%3Aform_plugins_for>
>  result << render_aspace_partial(:partial => "shared/subrecord_form",
>                      :locals => {:form => context, :name => parent['name'],
>                        :cardinality => parent['cardinality'].intern, :plugin => true})
> does not include the section id when rendering the aspace partial like it does for the other forms
>  <%= render_aspace_partial :partial => "shared/subrecord_form", :locals => {:form => form, :name => "rights_statements", :section_id => "#{@agent.agent_type}_rights_statements"} %>
> I think it works fine for plugins like HelloWorld because they don't need to worry about a parent since they only attach to the accessions and resources. Is there a work around for this? It's a small issue but essentially prevents user feasibility.
> Thank you,
> Carlos Lemus
> Application Programmer, Special Collections Technical Services
> University Libraries, University of Nevada, Las Vegas
> carlos.lemus at unlv.edu <mailto:cyndi.shein at unlv.edu>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20151111/36a5d48e/attachment.html>

More information about the Archivesspace_Users_Group mailing list