let refresh_max_date = 0;
let disable_buttons = [];
options['defaultDate'] = $(input).val();
if( $(input).data("flatpickr-futureinclusive") === true
|| $(input).data("flatpickr-futuredate") === true ) {
let original_date = $(input).val();
<label for="[% day.name | html %]" class="inline">[% PROCESS days d=day.name %]</label>
[% END %]
<p>
<em>Check days in the above list in order to keep them unpublished troughout upcoming renewals (permanent irregularities).</em>
<em>Check days in the above list in order to keep them unpublished throughout upcoming renewals (permanent irregularities).</em>
</p>
<em>Or check days in the "Not published" column below to set unpublished days for this subscription only.</em>
<label for="[% month.name | html %]" class="inline">[% PROCESS months m=month.name %]</label>
<em>Check months in the above list in order to keep them unpublished troughout upcoming renewals (permanent irregularities).</em>
<em>Check months in the above list in order to keep them unpublished throughout upcoming renewals (permanent irregularities).</em>
<em>Or check months in the "Not published" column below to set unpublished months for this subscription only.</em>
</div>
<em>Check weeks in the above list in order to keep them unpublished troughout upcoming renewals (permanent irregularities).</em>
<em>Check weeks in the above list in order to keep them unpublished throughout upcoming renewals (permanent irregularities).</em>
<em>Or check weeks in the "Not published" column below to set unpublished weeks for this subscription only.</em>
<select name="numbering_pattern" id="numberpattern" class="required" required="required">
<option value="">-- please choose --</option>
[% FOREACH numberpattern IN numberpatterns %]
<option value="[% numberpattern.id | html %]" [% IF numberpattern.selected %]selected="selected"[% END %]> </option>
<option value="[% numberpattern.id | html %]" [% IF numberpattern.selected %]selected="selected"[% END %]>[% numberpattern.label | html %]</option>
</select>
<span class="required">Required</span>
<ol>
<li>
<label for="startdate">Start date: </label>
<input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="flatpickr" />
<input type="text" size="10" id="startdate" name="startdate" class="flatpickr" value="[% startdate | html %]" />
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
</li>
[% FOREACH st IN [['numberlength', 'issues'], ['weeklength', 'weeks'], ['monthlength', 'months']] %]
[% SET subtype = st.0 %]
[% SET value = st.1 %]
<option value="[% value | html %]" [% IF subscription.$subtype %]selected="selected"[% END %]>
<option value="[% value | html %]"
[% IF subscription.$subtype %]
selected="selected"
[% END %]>
[% SWITCH subtype %]
[% CASE 'numberlength' %]
<span>issues</span>
-