View | Details | Raw Unified | Return to bug 37398
Collapse All | Expand All

(-)a/Koha/UI/Form/Builder/Item.pm (-1 / +22 lines)
Lines 147-152 sub generate_subfield_form { Link Here
147
        }
147
        }
148
    }
148
    }
149
149
150
    if ($subfield->{kohafield} =~ /items\.(replacementpricedate|dateaccessioned|datelastborrowed|onloan)/) {
151
        $subfield_data{datetype} = 'date';
152
    }
153
154
    if ($subfield->{kohafield} =~ /items\.(datelastseen|damaged_on|itemlost_on|withdrawn_on|deleted_on)/) {
155
        $subfield_data{datetype} = 'datetime';
156
    }
157
150
    $subfield_data{visibility} = "display:none;"
158
    $subfield_data{visibility} = "display:none;"
151
      if ( ( $subfield->{hidden} > 4 ) || ( $subfield->{hidden} <= -4 ) );
159
      if ( ( $subfield->{hidden} > 4 ) || ( $subfield->{hidden} <= -4 ) );
152
160
Lines 311-317 sub generate_subfield_form { Link Here
311
            authtypecode => $subfield->{authtypecode},
319
            authtypecode => $subfield->{authtypecode},
312
        };
320
        };
313
    }
321
    }
314
322
    elsif ( $subfield_data{datetype} eq 'date' ) {
323
        $subfield_data{marc_value} = {
324
            type => 'date_field',
325
            id => $subfield_data{id},
326
            value => $value,
327
        }
328
    }
329
    elsif ( $subfield_data{datetype} eq 'datetime' ) {
330
        $subfield_data{marc_value} = {
331
            type => 'datetime_field',
332
            id => $subfield_data{id},
333
            value => $value,
334
        }
335
    }
315
    # it's a plugin field
336
    # it's a plugin field
316
    elsif ( $subfield->{value_builder} ) {    # plugin
337
    elsif ( $subfield->{value_builder} ) {    # plugin
317
        require Koha::FrameworkPlugin;
338
        require Koha::FrameworkPlugin;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc (-1 / +4 lines)
Lines 166-171 Link Here
166
                        [% ELSE %]
166
                        [% ELSE %]
167
                            <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" rows="5" cols="64" >[% mv.value | html %]</textarea>
167
                            <textarea id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" rows="5" cols="64" >[% mv.value | html %]</textarea>
168
                        [% END %]
168
                        [% END %]
169
                    [% ELSIF ( mv.type == 'date_field' ) %]
170
                         <input type="text" id="[% mv.id | html %]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %] flatpickr" value="[% mv.value | html %]" class="flatpickr" />
171
                    [% ELSIF ( mv.type == 'datetime_field' ) %]
172
                         <input type="text" id="[% mv.id | html %]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %] flatpickr" value="[% mv.value | html %]" data-flatpickr-enable-time="true" />
169
                    [% END %]
173
                    [% END %]
170
174
171
                    [% IF subfield.kohafield == 'items.more_subfields_xml' %]
175
                    [% IF subfield.kohafield == 'items.more_subfields_xml' %]
172
- 

Return to bug 37398