Revision 33d6a85c
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
467 | 467 |
$bar->actions->[-1]->add_actions([ t8('Save as new'), |
468 | 468 |
submit => [ '#form', { action_save_as_new => 1 } ], |
469 | 469 |
checks => [ @req_trans_desc ], |
470 |
disabled => !$::form->{id},
|
|
470 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
471 | 471 |
]); |
472 | 472 |
$bar->actions->[-1]->add_actions([ t8('Save and Close'), |
473 | 473 |
submit => [ '#form', { action_save_and_close => 1 } ], |
... | ... | |
477 | 477 |
$bar->add_actions([ t8('Delete'), |
478 | 478 |
submit => [ '#form', { action_delete => 1 } ], |
479 | 479 |
confirm => t8('Do you really want to delete this object?'), |
480 |
disabled => !$::form->{id} |
|
481 |
|| ($is_sales_ord && !$::instance_conf->get_sales_order_show_delete) |
|
482 |
|| ($is_pur_ord && !$::instance_conf->get_purchase_order_show_delete), |
|
480 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') |
|
481 |
: ( ($is_sales_ord && !$::instance_conf->get_sales_order_show_delete) |
|
482 |
|| ($is_pur_ord && !$::instance_conf->get_purchase_order_show_delete)) ? t8('Deleting this type of record has been disabled in the configuration.') |
|
483 |
: undef, |
|
483 | 484 |
]); |
484 | 485 |
$bar->add_actions('separator'); |
485 | 486 |
$bar->add_actions('combobox'); |
... | ... | |
488 | 489 |
]); |
489 | 490 |
$bar->actions->[-1]->add_actions([ t8('Sales Order'), |
490 | 491 |
submit => [ '#form', { action_sales_order => 1 } ], |
491 |
disabled => !$::form->{id},
|
|
492 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
492 | 493 |
]) if $is_sales_quo; |
493 | 494 |
$bar->actions->[-1]->add_actions([ t8('Purchase Order'), |
494 | 495 |
submit => [ '#form', { action_sales_order => 1 } ], |
495 |
disabled => !$::form->{id},
|
|
496 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
496 | 497 |
]) if $is_req_quo; |
497 | 498 |
$bar->actions->[-1]->add_actions([ t8('Delivery Order'), |
498 | 499 |
submit => [ '#form', { action_delivery_order => 1 } ], |
499 |
disabled => !$::form->{id},
|
|
500 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
500 | 501 |
]) if $is_sales_ord || $is_pur_ord; |
501 | 502 |
$bar->actions->[-1]->add_actions([ t8('Invoice'), |
502 | 503 |
submit => [ '#form', { action_invoice => 1 } ], |
503 |
disabled => !$::form->{id},
|
|
504 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
504 | 505 |
]) if $allow_invoice; |
505 | 506 |
$bar->actions->[-1]->add_actions([ t8('Quotation'), |
506 | 507 |
submit => [ '#form', { action_quotation => 1 } ], |
507 |
disabled => !$::form->{id},
|
|
508 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
508 | 509 |
]); |
509 | 510 |
$bar->actions->[-1]->add_actions([ t8('Request for Quotation'), |
510 | 511 |
submit => [ '#form', { action_reqest_for_quotation => 1 } ], |
511 |
disabled => !$::form->{id}
|
|
512 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
512 | 513 |
]); |
513 | 514 |
$bar->add_actions('combobox'); |
514 | 515 |
$bar->actions->[-1]->add_actions([ t8('Export'), |
... | ... | |
527 | 528 |
disabled => 1, |
528 | 529 |
]); |
529 | 530 |
$bar->actions->[-1]->add_actions([ t8('History'), |
530 |
call => [ 'set_history_window', $::form->{id} * 1, 'id' ],
|
|
531 |
disabled => !$::form->{id},
|
|
531 |
call => [ 'set_history_window', $form->{id} * 1, 'id' ], |
|
532 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
532 | 533 |
]); |
533 | 534 |
$bar->actions->[-1]->add_actions([ t8('Follow-Up'), |
534 | 535 |
call => [ 'follow_up_window' ], |
535 |
disabled => !$::form->{id},
|
|
536 |
disabled => !$form->{id} ? t8('This record has not been saved yet.') : undef,
|
|
536 | 537 |
]); |
537 | 538 |
} |
538 | 539 |
|
Auch abrufbar als: Unified diff
ActionBar: Tooltips für deaktivierte Aktionen in oe.pl