[Archivesspace_Users_Group] Hiding Controlled Date Fields

Alexander Duryee alexanderduryee at nypl.org
Wed Feb 15 11:59:51 EST 2017


Since implementing automated date parsing in ASpace and our discovery
system, we don't have a local need for the controlled date fields in
ASpace's Date sub-form.  As such, we'd like to prevent the controlled date
fields from spawning in the data entry interface via a plug-in.

It seems that the subforms are generated by dates.crud.js, which creates
the forms upon the user selecting a date type.  I'm not quite certain how
to remove/override this bit of JavaScript via a plug-in - I tried modifying
the JS and saving the file to plugins/my-plugin/frontend/assets/, but to no
avail.  Is this the right approach to override the script's behavior, or is
there another tack I should be taking?

More ambitiously, we'd like to only show the controlled date subform to
users above a certain permission level.  We were able to implement this for
non-JS forms in the user interface (via user_can? checks), but I'm not
clear as to how this can be done for JS events.  Is this possible, and if
so, what would need to be modified?

Thanks!
--Alex

-- 
Alexander Duryee
Metadata Archivist
New York Public Library
(917)-229-9590
alexanderduryee at nypl.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170215/405430df/attachment.html>


More information about the Archivesspace_Users_Group mailing list