2022-08-13 09:26:09 -04:00
<div id={@id} class="col-12 col-sm-10 col-md-9 col-lg-8 col-xl-7 col-xxl-6 mt-1">
2021-03-23 13:29:46 -04:00
2021-03-23 15:31:45 -04:00
<h3>iCal Subscribe URL</h3>
2021-03-23 13:29:46 -04:00
2021-03-23 15:25:08 -04:00
<div class="row">
<div class="col mb-3">
<label class="form-label">Use this URL to subscribe in calendar software</label>
2022-08-13 09:26:09 -04:00
<input type="text" class="form-control" value={Routes.user_shifts_ics_url(@socket, :index, @current_user.calendar_slug)} readonly onclick="this.focus();this.select()" />
2021-03-23 15:25:08 -04:00
</div>
</div>
2021-03-23 13:29:46 -04:00
2021-03-23 15:25:08 -04:00
<p class="text-danger">Clicking the button will permanently change the subscription URL. Anyone using it will need the new URL to subscribe to your calendar.</p>
2021-03-23 15:12:24 -04:00
<%= form_for :calendar_slug, "#", [phx_submit: :save, phx_target: @myself], fn _csf -> %>
2021-03-23 13:29:46 -04:00
<%= submit "Generate new", class: "btn btn-primary" %>
<% end %>
</div>