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

(-)a/admin/aqcontract.pl (-8 / +8 lines)
Lines 71-78 if ( $op eq 'add_form' ) { Link Here
71
            contractnumber      => $contract->{contractnumber},
71
            contractnumber      => $contract->{contractnumber},
72
            contractname        => $contract->{contractname},
72
            contractname        => $contract->{contractname},
73
            contractdescription => $contract->{contractdescription},
73
            contractdescription => $contract->{contractdescription},
74
            contractstartdate => output_pref({ dt => dt_from_string( $contract->{contractstartdate} ), dateonly => 1 }),
74
            contractstartdate   => $contract->{contractstartdate},
75
            contractenddate   => output_pref({ dt => dt_from_string( $contract->{contractenddate} ), dateonly => 1 }),
75
            contractenddate     => $contract->{contractenddate},
76
        );
76
        );
77
    } else {
77
    } else {
78
        $template->param(
78
        $template->param(
Lines 95-102 elsif ( $op eq 'add_validate' ) { Link Here
95
95
96
    if ( $is_a_modif ) {
96
    if ( $is_a_modif ) {
97
        ModContract({
97
        ModContract({
98
            contractstartdate   => output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 }),
98
            contractstartdate   => eval { output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 } ); },
99
            contractenddate     =>  output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 }),
99
            contractenddate     => eval { output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 } ); },
100
            contractname        => $input->param('contractname'),
100
            contractname        => $input->param('contractname'),
101
            contractdescription => $input->param('contractdescription'),
101
            contractdescription => $input->param('contractdescription'),
102
            booksellerid        => $input->param('booksellerid'),
102
            booksellerid        => $input->param('booksellerid'),
Lines 107-114 elsif ( $op eq 'add_validate' ) { Link Here
107
            contractname        => $input->param('contractname'),
107
            contractname        => $input->param('contractname'),
108
            contractdescription => $input->param('contractdescription'),
108
            contractdescription => $input->param('contractdescription'),
109
            booksellerid        => $input->param('booksellerid'),
109
            booksellerid        => $input->param('booksellerid'),
110
            contractstartdate   => output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 }),
110
            contractstartdate   => eval { output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 } ); },
111
            contractenddate     => output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 }),
111
            contractenddate     => eval { output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 } ); },
112
        });
112
        });
113
    }
113
    }
114
114
Lines 127-134 elsif ( $op eq 'delete_confirm' ) { Link Here
127
        contractnumber      => $$contract{contractnumber},
127
        contractnumber      => $$contract{contractnumber},
128
        contractname        => $$contract{contractname},
128
        contractname        => $$contract{contractname},
129
        contractdescription => $$contract{contractdescription},
129
        contractdescription => $$contract{contractdescription},
130
        contractstartdate   => output_pref({ dt => dt_from_string( $$contract{contractstartdate} ), dateonly => 1 }),
130
        contractstartdate   => $$contract{contractstartdate},
131
        contractenddate     =>  output_pref({ dt => dt_from_string( $$contract{contractenddate} ), dateonly => 1 }),
131
        contractenddate     => $$contract{contractenddate},
132
    );
132
    );
133
133
134
    # END $OP eq DELETE_CONFIRM
134
    # END $OP eq DELETE_CONFIRM
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt (-5 / +5 lines)
Lines 1-3 Link Here
1
[% USE KohaDates %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; Contracts &rsaquo;
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Contracts &rsaquo;
3
[% IF ( add_form ) %]
4
[% IF ( add_form ) %]
Lines 120-130 function Check(ff) { Link Here
120
                                        <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
121
                                        <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription %]" />
121
                                </li>
122
                                </li>
122
                                <li><label for="from" class="required">Start date: *</label> &nbsp;
123
                                <li><label for="from" class="required">Start date: *</label> &nbsp;
123
                                        <input type="text" name="contractstartdate" id="from" value="[% contractstartdate %]" maxlength="10" size="10" class="datepickerfrom" />
124
                                        <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="datepickerfrom" />
124
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
125
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
125
                                </li>
126
                                </li>
126
                                <li><label for="to" class="required">End date: *</label> &nbsp;
127
                                <li><label for="to" class="required">End date: *</label> &nbsp;
127
                                        <input type="text" name="contractenddate" id="to" value="[% contractenddate %]" maxlength="10"  size="10" class="datepickerto" />
128
                                        <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10"  size="10" class="datepickerto" />
128
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
129
				<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
129
                                </li>
130
                                </li>
130
                            </ol>
131
                            </ol>
Lines 148-155 function Check(ff) { Link Here
148
                            <tr><th scope="row">Contract number:</th><td>[% contractnumber %]</td></tr>
149
                            <tr><th scope="row">Contract number:</th><td>[% contractnumber %]</td></tr>
149
                            <tr><th scope="row">Contract name:</th><td>[% contractname %]</td></tr>
150
                            <tr><th scope="row">Contract name:</th><td>[% contractname %]</td></tr>
150
                            <tr><th scope="row">Contract description:</th><td>[% contractdescription %]</td></tr>
151
                            <tr><th scope="row">Contract description:</th><td>[% contractdescription %]</td></tr>
151
                            <tr><th scope="row">Contract start date:</th><td>[% contractstartdate %]</td></tr>
152
                            <tr><th scope="row">Contract start date:</th><td>[% contractstartdate | $KohaDates %]</td></tr>
152
                            <tr><th scope="row">Contract end date:</th><td>[% contractenddate %]</td></tr>
153
                            <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
153
                            <tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
154
                            <tr><th scope="row">Vendor:</th><td>[% booksellername %]</td></tr>
154
                        </table>
155
                        </table>
155
                        <fieldset class="action">
156
                        <fieldset class="action">
156
- 

Return to bug 14931