Revision a9cc7718
Von Sven Schöling vor mehr als 16 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
274 | 274 |
|
275 | 275 |
# use JavaScript Calendar or not |
276 | 276 |
$form->{jsscript} = 1; |
277 |
$TMPL_VAR{button1} = qq| |
|
278 |
<td nowrap><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value="$form->{transdate}" onBlur=\"check_right_date_format(this)\"> |
|
279 |
<input type=button name=transdate id="trigger1" value=| . $locale->text('button') . qq|></td> |
|
280 |
|; |
|
281 |
$TMPL_VAR{button2} = qq| |
|
282 |
<td nowrap width="13"><input name=reqdate id=reqdate size=11 title="$myconfig{dateformat}" value="$form->{reqdate}" onBlur=\"check_right_date_format(this)\"> |
|
283 |
<input type=button name=reqdate name=reqdate id="trigger2" value=| . $locale->text('button') . qq|></td> |
|
284 |
|; |
|
285 |
#write Trigger |
|
286 |
$TMPL_VAR{jsscript} = Form->write_trigger(\%myconfig, "2", "transdate", "BL", "trigger1", "reqdate", "BL", "trigger2"); |
|
287 | 277 |
|
288 | 278 |
# openclosed checkboxes |
289 | 279 |
my @tmp; |
... | ... | |
293 | 283 |
$form->{"closed"} ? "checked" : "", $locale->text('Closed') if $form->{id}; |
294 | 284 |
$TMPL_VAR{openclosed} = sprintf qq|<tr><td colspan=%d align=center>%s</td></tr>\n|, 2 * scalar @tmp, join "\n", @tmp if @tmp; |
295 | 285 |
|
296 |
# set option selected |
|
297 |
foreach $item ($form->{vc}, 'currency', 'department', ($form->{vc} eq "customer" ? 'customer' : 'vendor')) { |
|
298 |
$form->{"select$item"} =~ s/ selected//; |
|
299 |
$form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; |
|
300 |
} |
|
301 |
|
|
302 |
#quote select[customer|vendor] Bug 133 |
|
303 |
$form->{"select$form->{vc}"} = $form->quote($form->{"select$form->{vc}"}); |
|
304 |
|
|
305 |
#substitute \n and \r to \s (bug 543) |
|
306 |
$form->{"select$form->{vc}"} =~ s/[\n\r]/ /g; |
|
307 |
|
|
286 |
# project ids |
|
308 | 287 |
my @old_project_ids = ($form->{"globalproject_id"}, grep { $_ } map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); |
309 | 288 |
|
310 | 289 |
my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; |
templates/webpages/oe/form_header_de.html | ||
---|---|---|
227 | 227 |
Angebotsdatum |
228 | 228 |
[%- END %] |
229 | 229 |
</th> |
230 |
[% button1 %] |
|
230 |
<td nowrap> |
|
231 |
<input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)"> |
|
232 |
<input type=button name=transdate id="trigger1" value="?"> |
|
233 |
</td> |
|
231 | 234 |
</tr> |
232 | 235 |
<tr> |
233 | 236 |
<th align="right" nowrap> |
... | ... | |
237 | 240 |
Lieferdatum |
238 | 241 |
[%- END %] |
239 | 242 |
</th> |
240 |
[% button2 %] |
|
243 |
<td nowrap> |
|
244 |
<input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)"> |
|
245 |
<input type=button name=reqdate id="trigger2" value="?"> |
|
246 |
</td> |
|
241 | 247 |
</tr> |
242 | 248 |
<tr> |
243 | 249 |
<th width="70%" align="right" nowrap>Projektnummer</th> |
... | ... | |
258 | 264 |
</td> |
259 | 265 |
</tr> |
260 | 266 |
|
261 |
[% jsscript %] |
|
267 |
<script type="text/javascript"> |
|
268 |
<!-- |
|
269 |
Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" }); |
|
270 |
Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" }); |
|
271 |
//--> |
|
272 |
</script> |
templates/webpages/oe/form_header_master.html | ||
---|---|---|
227 | 227 |
<translate>Quotation Date</translate> |
228 | 228 |
[%- END %] |
229 | 229 |
</th> |
230 |
[% button1 %] |
|
230 |
<td nowrap> |
|
231 |
<input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)"> |
|
232 |
<input type=button name=transdate id="trigger1" value="<translate>button</translate>"> |
|
233 |
</td> |
|
231 | 234 |
</tr> |
232 | 235 |
<tr> |
233 | 236 |
<th align="right" nowrap> |
... | ... | |
237 | 240 |
<translate>Required by</translate> |
238 | 241 |
[%- END %] |
239 | 242 |
</th> |
240 |
[% button2 %] |
|
243 |
<td nowrap> |
|
244 |
<input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)"> |
|
245 |
<input type=button name=reqdate id="trigger2" value="<translate>button</translate>"> |
|
246 |
</td> |
|
241 | 247 |
</tr> |
242 | 248 |
<tr> |
243 | 249 |
<th width="70%" align="right" nowrap><translate>Project Number</translate></th> |
... | ... | |
258 | 264 |
</td> |
259 | 265 |
</tr> |
260 | 266 |
|
261 |
[% jsscript %] |
|
267 |
<script type="text/javascript"> |
|
268 |
<!-- |
|
269 |
Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" }); |
|
270 |
Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" }); |
|
271 |
//--> |
|
272 |
</script> |
Auch abrufbar als: Unified diff
Vereinfachtes Template, und alten Code entfernt.