19 package org.turro.issue.wizard;
21 import org.turro.string.Strings;
22 import org.turro.elephant.context.Application;
23 import org.turro.i18n.I_;
24 import org.turro.jpa.input.EntityArrayListbox;
25 import org.turro.registry.ChangeCategory;
26 import org.turro.registry.DateTimeChange;
27 import org.turro.registry.NumberChange;
28 import org.turro.registry.UniqueNumber;
29 import org.turro.zkoss.input.ExpressionInput;
30 import org.turro.zkoss.label.LabelExtended;
31 import org.turro.zkoss.wizard.WizardPanelComposer;
32 import org.zkoss.zul.Datebox;
33 import org.zkoss.zul.Intbox;
34 import org.zkoss.zul.Textbox;
35 import org.zkoss.zul.Vlayout;
43 private Textbox comment;
44 private Datebox control, delivery, startDate, commentDate;
48 leftexpenses, lefthours, leftprice;
49 private Vlayout arrayPanel;
58 commentDate.setValue(iw.
date);
59 commentDate.setLenient(
true);
60 commentDate.setFormat(
"short+short");
61 commentDate.setDisabled(!app.
isInRole(
"issue:all"));
62 commentDate.setButtonVisible(!commentDate.isDisabled());
65 control.setLenient(
true);
66 control.setFormat(
"short+short");
68 delivery.setLenient(
true);
69 delivery.setFormat(
"short+short");
77 startDate.setLenient(
true);
78 startDate.setFormat(
"short+short");
89 public boolean doLeave(
boolean forwards) {
90 ChangeCategory issueCat =
new ChangeCategory(2,
I_.
get(
"Changes"));
91 ChangeCategory commentCat =
new ChangeCategory(5,
I_.
get(
"Comment"));
93 if(commentDate.getValue() !=
null) iw.
date = commentDate.getValue();
94 iw.
comment = comment.getValue();
104 if(!Strings.isBlank(iw.
comment)) {
111 if(iw.hours != 0.0d) {
115 if(iw.price != 0.0d) {
131 iw.
repeat = array.getObjectValue();
133 return !forwards || ( true );
149 array.setDisabled(startDate.getValue() ==
null);
150 count.setDisabled(array.isDisabled());
153 private void updateWhatsLeft() {
void setControlDate(Date controlDate)
void setStartDate(Date startDate)
void setHours(double hours)
void setPrice(double price)
void setExpenses(double expenses)
void setDelivery(Date delivery)
boolean isInRole(String role)
static Application getApplication()
static String get(String msg)
LabelExtended setDouble(double value)