2021-11-19 20:24:57 +08:00
|
|
|
<% due_date_editable = can_update_my_module_due_date?(my_module) %>
|
2020-03-28 00:35:24 +08:00
|
|
|
|
2021-11-19 20:24:57 +08:00
|
|
|
<span class="date-text" data-editable="<%= due_date_editable %>">
|
2020-03-28 00:35:24 +08:00
|
|
|
<span id="dueDateLabelContainer" class="view-block">
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "due_date_label" , locals: { my_module: my_module, due_date_editable: due_date_editable } %>
|
2020-03-17 00:55:35 +08:00
|
|
|
</span>
|
2021-11-19 20:24:57 +08:00
|
|
|
<% if due_date_editable %>
|
2020-03-17 00:55:35 +08:00
|
|
|
<div class="datetime-picker-container" id="due-date">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-calendar"></span>
|
2020-03-28 00:35:24 +08:00
|
|
|
<input id="calendarDueDate"
|
2020-03-17 00:55:35 +08:00
|
|
|
type="datetime"
|
|
|
|
data-toggle='date-time-picker'
|
|
|
|
class="form-control calendar-input"
|
|
|
|
readonly
|
2020-05-07 22:11:22 +08:00
|
|
|
placeholder="<%= t('my_modules.details.no_due_date_placeholder') %>"
|
2020-03-28 00:35:24 +08:00
|
|
|
data-date-format="<%= datetime_picker_format_full %>"
|
2020-03-17 00:55:35 +08:00
|
|
|
data-date-locale="<%= I18n.locale %>"
|
|
|
|
data-date-use-current="false"
|
2020-05-13 16:58:40 +08:00
|
|
|
data-date-orientation="left"
|
2020-03-17 00:55:35 +08:00
|
|
|
value="<%= my_module.due_date ? l(my_module.due_date, format: :full) : '' %>"/>
|
|
|
|
</div>
|
2023-06-08 23:33:50 +08:00
|
|
|
<span class="sn-icon sn-icon-close clear-date" data-toggle='clear-date-time-picker' data-target='calendarDueDate'></span>
|
2020-03-17 00:55:35 +08:00
|
|
|
<% end %>
|
|
|
|
</span>
|