Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JM - (SPARCFulfillment) Add Invoiced Button in UI #2044

Merged
merged 1 commit into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/assets/javascripts/catalog_manager/form.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ $ ->
type: if $(this).prop('checked') then 'POST' else 'DELETE'
url: "/catalog_manager/super_user?super_user[identity_id]=#{identity_id}&super_user[organization_id]=#{organization_id}"

success: ->
$("#su-access-empty-protocols-#{identity_id}").prop('disabled', !checked)
$("#su-billing-manager-#{identity_id}").prop('disabled', !checked)
if !checked
$("#su-access-empty-protocols-#{identity_id}").prop('checked', false)
$("#su-billing-manager-#{identity_id}").prop('checked', false)

$(document).on 'change', '.catalog-manager-checkbox', ->
identity_id = $(this).data('identity-id')
organization_id = $(this).data('organization-id')
Expand Down
13 changes: 10 additions & 3 deletions app/views/catalog_manager/organizations/_user_rights_row.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@
.row
.col-sm-6
= label_tag :access_empty_protocols, t(:catalog_manager)[:organization_form][:user_rights][:access_empty_protocols], class: 'non_bold_label'
= check_box_tag :access_empty_protocols, true, su.try(:access_empty_protocols), { id: "su-access-empty-protocols-#{user.id}", class: "su-access-empty-protocols", data: { identity_id: user.id, organization_id: organization.id } }
.col-sm-6
= label_tag :billing_manager, t(:catalog_manager)[:organization_form][:user_rights][:billing_manager], class: 'non_bold_label'
.row
.col-sm-6
= check_box_tag :access_empty_protocols, true, su.try(:access_empty_protocols), { id: "su-access-empty-protocols-#{user.id}", class: "su-access-empty-protocols", data: { identity_id: user.id, organization_id: organization.id } }
.col-sm-6
= check_box_tag :billing_manager, true, su.try(:billing_manager), { id: "su-billing-manager-#{user.id}", class: "su-billing-manager", data: { identity_id: user.id, organization_id: organization.id } }

.col-sm-2.text-center
Expand All @@ -52,8 +55,12 @@

- if !cm.nil?
.form_row
= label_tag :edit_historic_data, t(:catalog_manager)[:organization_form][:user_rights][:edit_historic_data], class: 'non_bold_label'
= check_box_tag :edit_historic_data, true, cm.try(:edit_historic_data), { id: "cm-edit-historic-data-#{user.id}", class: "cm-edit-historic-data", data: { identity_id: user.id, organization_id: organization.id } }
.row
.col-sm-12
= label_tag :edit_historic_data, t(:catalog_manager)[:organization_form][:user_rights][:edit_historic_data], class: 'non_bold_label'
.row
.col-sm-12
= check_box_tag :edit_historic_data, true, cm.try(:edit_historic_data), { id: "cm-edit-historic-data-#{user.id}", class: "cm-edit-historic-data", data: { identity_id: user.id, organization_id: organization.id } }
- unless organization.type == "Institution" or !organization.process_ssrs
.col-sm-3.text-center
= check_box_tag :service_provider, true, !cp.nil?, { class: "service-provider-checkbox", data: { identity_id: user.id, organization_id: organization.id } }
Expand Down
6 changes: 3 additions & 3 deletions config/locales/catalog_manager.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ en:
user_rights:
name_email: "Name, Email"
super_user: "Super User"
access_empty_protocols: "Access Empty Protocols:"
billing_manager: "Billing Manager Rights"
access_empty_protocols: "Empty Protocols"
billing_manager: "Billing Manager"
catalog_manager: "Catalog Manager"
edit_historic_data: "Edit Historical Data:"
edit_historic_data: "Edit Historical Data"
service_provider: "Service Provider"
primary_contact: "Primary Contact:"
hold_emails: "Hold Emails:"
Expand Down