Skip to content

Commit

Permalink
made reserve dates read only
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Deli committed Jan 6, 2025
1 parent f97d7fd commit 5f3634a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/requests/_form_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@
<%= f.input :reserve_location_id, collection: Location.active, required: true, hint: "Where do you want students to pick up your items?" %>
</div>
<div class="col-sm-3">
<%= f.input :reserve_start_date, as: :string, readonly: ! current_user.admin?, required: false, hint: "Prefilled after term selection.",
input_html: { id: "request_reserve_start_date", class: current_user.admin? ? "datepicker" : "" } %>
<%= f.input :reserve_start_date, as: :string, readonly: true, required: false, hint: "Prefilled after term selection.",
input_html: { id: "request_reserve_start_date", class: "" } %>
</div>
<div class="col-sm-3">
<%= f.input :reserve_end_date, as: :string, readonly: ! current_user.admin?, required: false,
input_html: { id: "request_reserve_end_date", class: current_user.admin? ? "datepicker" : "" } %>
<%= f.input :reserve_end_date, as: :string, readonly: true, required: false,
input_html: { id: "request_reserve_end_date", class: "" } %>
</div>
</div> <!-- row end -->
</div>
Expand Down

0 comments on commit 5f3634a

Please sign in to comment.