Skip to content

Commit

Permalink
Merge pull request #3067 from DMPRoadmap/Bug_2941-make-DMP-contributo…
Browse files Browse the repository at this point in the history
…rs-phone-number-requirement-configurable

Issue #2941 - Make the display of the phome number in the Plan
  • Loading branch information
briri authored Jan 31, 2022
2 parents aa63017 + 41a2791 commit 7bca37c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 14 additions & 12 deletions app/views/contributors/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,21 @@ roles_tooltip = _("Select each role that applies to the contributor.")
<% end %>
</div>

<div class="form-group row"><!-- phone -->
<div class="col-md-12">
<%= form.label(:phone, _("Phone number"), class: "control-label") %>
</div>
<div class="col-md-3">
<em class="sr-only"><%= phone_tooltip %></em>
<%= form.phone_field :phone, class: "form-control",
title: phone_tooltip,
data: { toggle: "tooltip" },
pattern: "[0-9\-\.\(\)\+]+",
placeholder: "123-123-1234" %>
<% if Rails.configuration.x.application.display_contributor_phone_number %><!-- phone: only show if property set true -->
<div class="form-group row">
<div class="col-md-12">
<%= form.label(:phone, _("Phone number"), class: "control-label") %>
</div>
<div class="col-md-3">
<em class="sr-only"><%= phone_tooltip %></em>
<%= form.phone_field :phone, class: "form-control",
title: phone_tooltip,
data: { toggle: "tooltip" },
pattern: "[0-9\-\.\(\)\+]+",
placeholder: "123-123-1234" %>
</div>
</div>
</div>
<% end %>

<div class="form-group row" id="contributor-org-controls"><!-- org -->
<div class="col-md-8">
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/_dmproadmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class Application < Rails::Application
}
# Setting to only take orgs from local and not allow on-the-fly creation
config.x.application.restrict_orgs = false
# Setting to display phone number in contributor form
config.x.application.display_contributor_phone_number = false

# ------------------- #
# SHIBBOLETH SETTINGS #
Expand Down

0 comments on commit 7bca37c

Please sign in to comment.