Files
wekan/client/components/forms/datepicker.jade
T
Lauri Ojansivu 75b17fe838 Place Date Copy after Time.
Force Date, Time and Copy into that visual order and remove the redundant in-form X because the popup header already closes the editor.

Thanks to xet7 !
2026-08-18 21:28:00 +03:00

30 lines
1.5 KiB
Plaintext

//- The date-and-time form every "edit a date" popup is made of: the card's
//- Received, Start, Due and End dates, a vote's and a planning poker's end
//- date, and a date custom field. Eight popups drew this same form, letter for
//- letter, in three different files.
//-
//- It takes what it shows as ARGUMENTS rather than reading helpers: a helper
//- inside a template is looked up on that template, not on the one including
//- it, and all eight popups keep their own state and handlers
//- (client/lib/datepicker.js, which they already shared - it was only the
//- markup that was copied). So this template has no code of its own at all;
//- it renders the popup's datePicker state and the buttons. Its events live on
//- this template too: Blaze events do not cross a child-template boundary.
template(name="editDateForm")
.datepicker-container
form.edit-date(class="{{#if customFieldControls}}custom-field-date-editor{{/if}}")
.fields
.left
label(for="date") {{_ 'date'}}
input.js-date-field#date(type="date" name="date" value=showDate autofocus)
.right
label(for="time") {{_ 'time'}}
input.js-time-field#time(type="time" name="time" value=showTime)
if customFieldControls
.custom-field-date-copy
+customFieldCopyButton(value=customFieldCopyValue)
if error.get
.warning {{_ error.get}}
button.primary.wide.left.js-submit-date(type="submit") {{_ 'save'}}
button.js-delete-date.negate.wide.right.js-delete-date {{_ 'delete'}}