Skip to content

Commit

Permalink
restore modal close and fix breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hoffman committed May 20, 2022
1 parent a21dbc0 commit 8c0c7e1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions frontend/app/assets/javascripts/archival_objects.crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ function SimpleLinkingModal(config) {
{},
this
);
if (config.must_select) {
$('.modal-header a', self.$modal).hide();
}
self.$container = $('.linker-container', self.$modal);
self.reload_modal(self.config.url_html);
self.init_click_handlers();
Expand Down Expand Up @@ -233,7 +230,6 @@ function validateResourceAndParent() {
types: ['resource'],
linker: true, //?
multiplicity: 1,
must_select: true,
onLink: function (resource_uri) {
$resourceInput.attr('name', 'archival_object[resource][ref]');
$resourceInput.val(resource_uri);
Expand Down
2 changes: 0 additions & 2 deletions frontend/app/controllers/archival_objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class ArchivalObjectsController < ApplicationController
"delete_archival_record" => [:delete],
"manage_repository" => [:defaults, :update_defaults]



def new
@archival_object = ArchivalObject.new._always_valid!
@archival_object.parent = {'ref' => ArchivalObject.uri_for(params[:archival_object_id])} if params.has_key?(:archival_object_id)
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def setup_context(options)

title = (options[:title] || object["title"] || object["username"]).to_s

breadcrumb_trail.push(["#{I18n.t("#{controller.to_s.singularize}._plural")}", {:controller => controller, :action => :index}])
breadcrumb_trail.push([I18n.t("#{controller.to_s.singularize}._plural"), {:controller => controller, :action => :index}])

if object.id
breadcrumb_trail.push([title, {:controller => controller, :action => :show}])
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/archival_objects/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= setup_context :object => @archival_object %>
<%= setup_context :object => @archival_object, :controller => :resources %>

<div id="object_container">
<%= form_for @archival_object, :as => "archival_object", :url => {:action => :create}, :html => {:class => 'form-horizontal aspace-record-form', :id => "archival_object_form"} do |f| %>
Expand Down

0 comments on commit 8c0c7e1

Please sign in to comment.