parent
6db416dd04
commit
2819cc125c
@ -0,0 +1,31 @@
|
|||||||
|
package info.bukova.isspst;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class RegExUtils {
|
||||||
|
public static List<String> getMatches(String input, String regEx, int group) {
|
||||||
|
List<String> list = new ArrayList<String>();
|
||||||
|
|
||||||
|
if (!StringUtils.isNullOrEmpty(input) && !StringUtils.isNullOrEmpty(regEx)) {
|
||||||
|
Pattern pattern = Pattern.compile(regEx);
|
||||||
|
Matcher matcher = pattern.matcher(input);
|
||||||
|
int groupCount = matcher.groupCount() + 1;
|
||||||
|
|
||||||
|
if ((groupCount >= 0) && (group < groupCount)) {
|
||||||
|
while (matcher.find()) {
|
||||||
|
String item = matcher.group(group);
|
||||||
|
list.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<String> getMatches(String input, String regEx) {
|
||||||
|
return RegExUtils.getMatches(input, regEx, 0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package info.bukova.isspst.ui;
|
||||||
|
|
||||||
|
import org.zkoss.bind.annotation.Init;
|
||||||
|
|
||||||
|
public class BindingViewModel<T> extends DocumentViewModel {
|
||||||
|
|
||||||
|
private BindingForm<T> dataForm;
|
||||||
|
|
||||||
|
@Init
|
||||||
|
public void initBindingViewModel() {
|
||||||
|
super.initDocumentViewModel();
|
||||||
|
|
||||||
|
dataForm = new BindingForm<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public BindingForm<T> getDataForm() {
|
||||||
|
return this.dataForm;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,155 @@
|
|||||||
|
package info.bukova.isspst.validators;
|
||||||
|
|
||||||
|
import info.bukova.isspst.Constants;
|
||||||
|
import info.bukova.isspst.RegExUtils;
|
||||||
|
import info.bukova.isspst.StringUtils;
|
||||||
|
import info.bukova.isspst.data.Requirement;
|
||||||
|
import info.bukova.isspst.data.SettingsData;
|
||||||
|
import info.bukova.isspst.sort.ReflectionTools;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.zkoss.bind.ValidationContext;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zul.Tab;
|
||||||
|
import org.zkoss.zul.Tabbox;
|
||||||
|
import org.zkoss.zul.Window;
|
||||||
|
|
||||||
|
public class GlobalSettingValidator extends BaseValidator {
|
||||||
|
|
||||||
|
private final static Logger log = LoggerFactory.getLogger(GlobalSettingValidator.class.getName());
|
||||||
|
|
||||||
|
private Window mainWindow;
|
||||||
|
|
||||||
|
private SettingsData settingsData;
|
||||||
|
|
||||||
|
public GlobalSettingValidator(Window mainWindow) {
|
||||||
|
this.mainWindow = mainWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String SwitchTabs(String idIncludedPage, String idTabBox, String idTab, boolean select) {
|
||||||
|
if (this.mainWindow == null) {
|
||||||
|
log.warn("Neznámé okno globálního nastavení!!!");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrEmpty(idTabBox) || StringUtils.isNullOrEmpty(idTab)) {
|
||||||
|
log.warn("Neznámý Tabbox nebo Tab identifikátor globálního nastavení!!!");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
Component component = this.mainWindow;
|
||||||
|
|
||||||
|
if (!StringUtils.isNullOrEmpty(idIncludedPage)) {
|
||||||
|
Component includedPageComponent = component.getFellow(idIncludedPage);
|
||||||
|
|
||||||
|
if (includedPageComponent != null) {
|
||||||
|
component = includedPageComponent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Tabbox tabBox = (Tabbox) component.getFellowIfAny(idTabBox, true);
|
||||||
|
|
||||||
|
if (tabBox == null) {
|
||||||
|
log.warn("Neznámý Tabbox identifikátor '" + idTabBox + "' globálního nastavení!!!");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Tab tab = (Tab) component.getFellowIfAny(idTab, true);
|
||||||
|
|
||||||
|
if (tab == null) {
|
||||||
|
log.warn("Neznámý Tab identifikátor '" + idTab + "' globálního nastavení!!!");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
if (select) {
|
||||||
|
tabBox.setSelectedTab(tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tab.getLabel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateMailMessage(String text, String idTab, String idComponent) {
|
||||||
|
if (this.ctx == null) {
|
||||||
|
log.warn("Neznámý ValidationContext!!!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> properties = ReflectionTools.getEntityFields(Requirement.class);
|
||||||
|
properties.add(Constants.MAIL_URL_KEYWORD);
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrEmpty(text)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> matches;
|
||||||
|
final String regex = "\\[([^\\[\\]]*?)\\]";
|
||||||
|
|
||||||
|
matches = RegExUtils.getMatches(text, regex, 1);
|
||||||
|
String message = "";
|
||||||
|
|
||||||
|
for (int i = 0; i < matches.size(); i++) {
|
||||||
|
String propertyCandidate = matches.get(i);
|
||||||
|
|
||||||
|
if (!properties.contains(propertyCandidate)) {
|
||||||
|
message = "Vlastnost [" + propertyCandidate + "] neexistuje!";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrEmpty(message)) {
|
||||||
|
text = text.replaceAll(regex, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrEmpty(message) && text.contains("[")) {
|
||||||
|
message = "Chybně použitý speciální znak '[' !\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNullOrEmpty(message) && text.contains("]")) {
|
||||||
|
message = "Chybně použitý speciální znak ']' !\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean badCondition = !StringUtils.isNullOrEmpty(message);
|
||||||
|
|
||||||
|
if (badCondition) {
|
||||||
|
this.SwitchTabs("", "idTabBox", "idTabEmails", true);
|
||||||
|
this.SwitchTabs("idIncludedPageEmails", "idTabBoxEmails", idTab, true);
|
||||||
|
this.errorMsg(this.ctx, message, idComponent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void validate(ValidationContext ctx) {
|
||||||
|
|
||||||
|
super.validate(ctx);
|
||||||
|
|
||||||
|
// Map<String, Property[]> map = ctx.getProperties();
|
||||||
|
//
|
||||||
|
// for (Map.Entry<String, Property[]> entry : map.entrySet()) {
|
||||||
|
// String key = entry.getKey();
|
||||||
|
// Property[] values = entry.getValue();
|
||||||
|
// }
|
||||||
|
|
||||||
|
String value;
|
||||||
|
|
||||||
|
value = this.getStringProperty("newReqTemplate.text");
|
||||||
|
this.validateMailMessage(value, "idTabEmailsNewRequirement", "idEmailNewReqTemplateText");
|
||||||
|
|
||||||
|
value = this.getStringProperty("authReqTemplate.text");
|
||||||
|
this.validateMailMessage(value, "idTabEmailsAuthRequirement", "idEmailAuthReqTemplateText");
|
||||||
|
|
||||||
|
value = this.getStringProperty("confReqTemplate.text");
|
||||||
|
this.validateMailMessage(value, "idTabEmailsConfirmRequirement", "idEmailConfReqTemplateText");
|
||||||
|
|
||||||
|
value = this.getStringProperty("reqPassenger.text");
|
||||||
|
this.validateMailMessage(value, "idTabEmailsReqTripPassengers", "idEmailReqPassengerTemplateText");
|
||||||
|
|
||||||
|
value = this.getStringProperty("confReqTripPassenger.text");
|
||||||
|
this.validateMailMessage(value, "idTabEmailsConfirmTripPassengers", "idEmailConfReqTripPassengerTemplateText");
|
||||||
|
}
|
||||||
|
}
|
@ -1,172 +1,276 @@
|
|||||||
<?page title="email" contentType="text/html;charset=UTF-8"?>
|
<?page title="email" contentType="text/html;charset=UTF-8"?>
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul"
|
<zk
|
||||||
|
xmlns="http://www.zkoss.org/2005/zul"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
|
||||||
<tabbox>
|
<tabbox id="idTabBoxEmails">
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab label="${labels.NewRequirement}"/>
|
<tab
|
||||||
<tab label="${labels.AuthRequirement}"/>
|
id="idTabEmailsNewRequirement"
|
||||||
<tab label="${labels.ConfirmRequirement}"/>
|
label="${labels.NewRequirement}" />
|
||||||
<tab label="${labels.ReqTripPassengers}"/>
|
<tab
|
||||||
<tab label="${labels.ConfirmTripPassengers}"/>
|
id="idTabEmailsAuthRequirement"
|
||||||
</tabs>
|
label="${labels.AuthRequirement}" />
|
||||||
<tabpanels>
|
<tab
|
||||||
<tabpanel>
|
id="idTabEmailsConfirmRequirement"
|
||||||
<grid>
|
label="${labels.ConfirmRequirement}" />
|
||||||
<columns>
|
<tab
|
||||||
<column hflex="min"/>
|
id="idTabEmailsReqTripPassengers"
|
||||||
<column/>
|
label="${labels.ReqTripPassengers}" />
|
||||||
</columns>
|
<tab
|
||||||
<rows>
|
id="idTabEmailsConfirmTripPassengers"
|
||||||
<row>
|
label="${labels.ConfirmTripPassengers}" />
|
||||||
<label value="${labels.MailSubject}" />
|
</tabs>
|
||||||
<textbox
|
<tabpanels>
|
||||||
value="@bind(vm.settings.newReqTemplate.subject)"
|
<tabpanel>
|
||||||
width="100%"
|
<grid>
|
||||||
maxlength="@load(vm.lengthText)"
|
<columns>
|
||||||
readonly="@load(not vm.canSave)" />
|
<column hflex="min" />
|
||||||
</row>
|
<column />
|
||||||
<row spans="2">
|
</columns>
|
||||||
<vbox>
|
<rows>
|
||||||
<ckeditor toolbar="Basic" value="@bind(vm.settings.newReqTemplate.text)" width="460px" height="180px" if="${vm.canSave}"/>
|
<row>
|
||||||
<html content="@load(vm.settings.newReqTemplate.text)" width="460px" height="180px" if="${not vm.canSave}"/>
|
<label value="${labels.MailSubject}" />
|
||||||
<hbox>
|
<textbox
|
||||||
<button label="${labels.InsertField}" popup="fieldsNew, position=after_start" disabled="@load(not vm.canSave)"/>
|
id="idEmailNewReqTemplateSubject"
|
||||||
<button label="${labels.GlobalSettingsInsertUrl}" onClick="@command('insertUrl', message=vm.settings.newReqTemplate)" disabled="@load(not vm.canSave)"/>
|
instant="true"
|
||||||
</hbox>
|
value="@bind(vm.settings.newReqTemplate.subject)"
|
||||||
</vbox>
|
width="100%"
|
||||||
</row>
|
maxlength="@load(vm.lengthText)"
|
||||||
</rows>
|
readonly="@load(not vm.canSave)" />
|
||||||
</grid>
|
</row>
|
||||||
</tabpanel>
|
<row spans="2">
|
||||||
<tabpanel>
|
<vbox>
|
||||||
<grid>
|
<ckeditor
|
||||||
<columns>
|
toolbar="Basic"
|
||||||
<column hflex="min"/>
|
value="@bind(fx.newReqTemplate.text)"
|
||||||
<column/>
|
width="460px"
|
||||||
</columns>
|
height="180px"
|
||||||
<rows>
|
if="${vm.canSave}" />
|
||||||
<row>
|
<html
|
||||||
<label value="${labels.MailSubject}" />
|
id="idEmailNewReqTemplateText"
|
||||||
<textbox
|
content="@load(vm.settings.newReqTemplate.text)"
|
||||||
value="@bind(vm.settings.authReqTemplate.subject)"
|
width="460px"
|
||||||
width="100%"
|
height="180px"
|
||||||
maxlength="@load(vm.lengthText)"
|
if="${not vm.canSave}" />
|
||||||
readonly="@load(not vm.canSave)" />
|
<hbox>
|
||||||
</row>
|
<button
|
||||||
<row spans="2">
|
label="${labels.InsertField}"
|
||||||
<vbox>
|
popup="fieldsNew, position=after_start"
|
||||||
<ckeditor toolbar="Basic" value="@bind(vm.settings.authReqTemplate.text)" width="460px" height="180px" if="${vm.canSave}" />
|
disabled="@load(not vm.canSave)" />
|
||||||
<html content="@load(vm.settings.authReqTemplate.text)" width="460px" height="180px" if="${not vm.canSave}"/>
|
<button
|
||||||
<hbox>
|
label="${labels.GlobalSettingsInsertUrl}"
|
||||||
<button label="${labels.InsertField}" popup="fieldsAuth, position=after_start" disabled="@load(not vm.canSave)"/>
|
onClick="@command('insertUrl2Fx', form=fx, property='newReqTemplate.text')"
|
||||||
<button label="${labels.GlobalSettingsInsertUrl}" onClick="@command('insertUrl', message=vm.settings.authReqTemplate)" disabled="@load(not vm.canSave)"/>
|
disabled="@load(not vm.canSave)" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</tabpanel>
|
</tabpanel>
|
||||||
<tabpanel>
|
<tabpanel>
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
<columns>
|
||||||
<column hflex="min"/>
|
<column hflex="min" />
|
||||||
<column/>
|
<column />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${labels.MailSubject}" />
|
<label value="${labels.MailSubject}" />
|
||||||
<textbox
|
<textbox
|
||||||
value="@bind(vm.settings.confReqTemplate.subject)"
|
value="@bind(vm.settings.authReqTemplate.subject)"
|
||||||
width="100%"
|
width="100%"
|
||||||
maxlength="@load(vm.lengthText)"
|
maxlength="@load(vm.lengthText)"
|
||||||
readonly="@load(not vm.canSave)" />
|
readonly="@load(not vm.canSave)" />
|
||||||
</row>
|
</row>
|
||||||
<row spans="2">
|
<row spans="2">
|
||||||
<vbox>
|
<vbox>
|
||||||
<ckeditor toolbar="Basic" value="@bind(vm.settings.confReqTemplate.text)" width="460px" height="180px" if="${vm.canSave}" />
|
<ckeditor
|
||||||
<html content="@load(vm.settings.confReqTemplate.text)" width="460px" height="180px" if="${not vm.canSave}"/>
|
toolbar="Basic"
|
||||||
<button label="${labels.InsertField}" popup="fieldsConfirm, position=after_start" disabled="@load(not vm.canSave)"/>
|
value="@bind(fx.authReqTemplate.text)"
|
||||||
</vbox>
|
width="460px"
|
||||||
</row>
|
height="180px"
|
||||||
</rows>
|
if="${vm.canSave}" />
|
||||||
</grid>
|
<html
|
||||||
</tabpanel>
|
id="idEmailAuthReqTemplateText"
|
||||||
<tabpanel>
|
content="@load(vm.settings.authReqTemplate.text)"
|
||||||
<grid>
|
width="460px"
|
||||||
<columns>
|
height="180px"
|
||||||
<column hflex="min"/>
|
if="${not vm.canSave}" />
|
||||||
<column/>
|
<hbox>
|
||||||
</columns>
|
<button
|
||||||
<rows>
|
label="${labels.InsertField}"
|
||||||
<row>
|
popup="fieldsAuth, position=after_start"
|
||||||
<label value="${labels.MailSubject}" />
|
disabled="@load(not vm.canSave)" />
|
||||||
<textbox
|
<button
|
||||||
value="@bind(vm.settings.reqPassenger.subject)"
|
label="${labels.GlobalSettingsInsertUrl}"
|
||||||
width="100%"
|
onClick="@command('insertUrl2Fx', form=fx, property='authReqTemplate.text')"
|
||||||
maxlength="@load(vm.lengthText)"
|
disabled="@load(not vm.canSave)" />
|
||||||
readonly="@load(not vm.canSave)" />
|
</hbox>
|
||||||
</row>
|
</vbox>
|
||||||
<row spans="2">
|
</row>
|
||||||
<vbox>
|
</rows>
|
||||||
<ckeditor toolbar="Basic" value="@bind(vm.settings.reqPassenger.text)" width="460px" height="180px" if="${vm.canSave}" />
|
</grid>
|
||||||
<html content="@load(vm.settings.confReqTemplate.text)" width="460px" height="180px" if="${not vm.canSave}"/>
|
</tabpanel>
|
||||||
<button label="${labels.InsertField}" popup="fieldsPassenger, position=after_start" disabled="@load(not vm.canSave)"/>
|
<tabpanel>
|
||||||
</vbox>
|
<grid>
|
||||||
</row>
|
<columns>
|
||||||
</rows>
|
<column hflex="min" />
|
||||||
</grid>
|
<column />
|
||||||
</tabpanel>
|
</columns>
|
||||||
<tabpanel>
|
<rows>
|
||||||
<grid>
|
<row>
|
||||||
<columns>
|
<label value="${labels.MailSubject}" />
|
||||||
<column hflex="min"/>
|
<textbox
|
||||||
<column/>
|
value="@bind(vm.settings.confReqTemplate.subject)"
|
||||||
</columns>
|
width="100%"
|
||||||
<rows>
|
maxlength="@load(vm.lengthText)"
|
||||||
<row>
|
readonly="@load(not vm.canSave)" />
|
||||||
<label value="${labels.MailSubject}" />
|
</row>
|
||||||
<textbox
|
<row spans="2">
|
||||||
value="@bind(vm.settings.confReqTripPassenger.subject)"
|
<vbox>
|
||||||
width="100%"
|
<ckeditor
|
||||||
maxlength="@load(vm.lengthText)"
|
toolbar="Basic"
|
||||||
readonly="@load(not vm.canSave)" />
|
value="@bind(fx.confReqTemplate.text)"
|
||||||
</row>
|
width="460px"
|
||||||
<row spans="2">
|
height="180px"
|
||||||
<vbox>
|
if="${vm.canSave}" />
|
||||||
<ckeditor toolbar="Basic" value="@bind(vm.settings.confReqTripPassenger.text)" width="460px" height="180px" if="${vm.canSave}" />
|
<html
|
||||||
<html content="@load(vm.settings.confReqTemplate.text)" width="460px" height="180px" if="${not vm.canSave}"/>
|
id="idEmailConfReqTemplateText"
|
||||||
<button label="${labels.InsertField}" popup="fieldsConfirmPass, position=after_start" disabled="@load(not vm.canSave)"/>
|
content="@load(vm.settings.confReqTemplate.text)"
|
||||||
</vbox>
|
width="460px"
|
||||||
</row>
|
height="180px"
|
||||||
</rows>
|
if="${not vm.canSave}" />
|
||||||
</grid>
|
<button
|
||||||
</tabpanel>
|
label="${labels.InsertField}"
|
||||||
</tabpanels>
|
popup="fieldsConfirm, position=after_start"
|
||||||
</tabbox>
|
disabled="@load(not vm.canSave)" />
|
||||||
<menupopup id="fieldsNew" children="@load(vm.requirementFields)">
|
</vbox>
|
||||||
<template name="children">
|
</row>
|
||||||
<menuitem label="@load(each) @converter(vm.locConverter)" onClick="@command('insertField', field=each, message=vm.settings.newReqTemplate)"/>
|
</rows>
|
||||||
</template>
|
</grid>
|
||||||
</menupopup>
|
</tabpanel>
|
||||||
<menupopup id="fieldsAuth" children="@load(vm.requirementFields)">
|
<tabpanel>
|
||||||
<template name="children">
|
<grid>
|
||||||
<menuitem label="@load(each) @converter(vm.locConverter)" onClick="@command('insertField', field=each, message=vm.settings.authReqTemplate)"/>
|
<columns>
|
||||||
</template>
|
<column hflex="min" />
|
||||||
</menupopup>
|
<column />
|
||||||
<menupopup id="fieldsConfirm" children="@load(vm.requirementFields)">
|
</columns>
|
||||||
<template name="children">
|
<rows>
|
||||||
<menuitem label="@load(each) @converter(vm.locConverter)" onClick="@command('insertField', field=each, message=vm.settings.confReqTemplate)"/>
|
<row>
|
||||||
</template>
|
<label value="${labels.MailSubject}" />
|
||||||
</menupopup>
|
<textbox
|
||||||
<menupopup id="fieldsConfirmPass" children="@load(vm.requirementFields)">
|
value="@bind(vm.settings.reqPassenger.subject)"
|
||||||
<template name="children">
|
width="100%"
|
||||||
<menuitem label="@load(each) @converter(vm.locConverter)" onClick="@command('insertField', field=each, message=vm.settings.confReqTripPassenger)"/>
|
maxlength="@load(vm.lengthText)"
|
||||||
</template>
|
readonly="@load(not vm.canSave)" />
|
||||||
</menupopup>
|
</row>
|
||||||
<menupopup id="fieldsPassenger" children="@load(vm.requirementFields)">
|
<row spans="2">
|
||||||
<template name="children">
|
<vbox>
|
||||||
<menuitem label="@load(each) @converter(vm.locConverter)" onClick="@command('insertField', field=each, message=vm.settings.reqPassenger)"/>
|
<ckeditor
|
||||||
</template>
|
toolbar="Basic"
|
||||||
</menupopup>
|
value="@bind(fx.reqPassenger.text)"
|
||||||
|
width="460px"
|
||||||
|
height="180px"
|
||||||
|
if="${vm.canSave}" />
|
||||||
|
<html
|
||||||
|
id="idEmailReqPassengerTemplateText"
|
||||||
|
content="@load(vm.settings.reqPassenger.text)"
|
||||||
|
width="460px"
|
||||||
|
height="180px"
|
||||||
|
if="${not vm.canSave}" />
|
||||||
|
<button
|
||||||
|
label="${labels.InsertField}"
|
||||||
|
popup="fieldsPassenger, position=after_start"
|
||||||
|
disabled="@load(not vm.canSave)" />
|
||||||
|
</vbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</tabpanel>
|
||||||
|
<tabpanel>
|
||||||
|
<grid>
|
||||||
|
<columns>
|
||||||
|
<column hflex="min" />
|
||||||
|
<column />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${labels.MailSubject}" />
|
||||||
|
<textbox
|
||||||
|
value="@bind(vm.settings.confReqTripPassenger.subject)"
|
||||||
|
width="100%"
|
||||||
|
maxlength="@load(vm.lengthText)"
|
||||||
|
readonly="@load(not vm.canSave)" />
|
||||||
|
</row>
|
||||||
|
<row spans="2">
|
||||||
|
<vbox>
|
||||||
|
<ckeditor
|
||||||
|
toolbar="Basic"
|
||||||
|
value="@bind(fx.confReqTripPassenger.text)"
|
||||||
|
width="460px"
|
||||||
|
height="180px"
|
||||||
|
if="${vm.canSave}" />
|
||||||
|
<html
|
||||||
|
id="idEmailConfReqTripPassengerTemplateText"
|
||||||
|
content="@load(vm.settings.confReqTripPassenger.text)"
|
||||||
|
width="460px"
|
||||||
|
height="180px"
|
||||||
|
if="${not vm.canSave}" />
|
||||||
|
<button
|
||||||
|
label="${labels.InsertField}"
|
||||||
|
popup="fieldsConfirmPass, position=after_start"
|
||||||
|
disabled="@load(not vm.canSave)" />
|
||||||
|
</vbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</tabpanel>
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
<menupopup
|
||||||
|
id="fieldsNew"
|
||||||
|
children="@load(vm.requirementFields)">
|
||||||
|
<template name="children">
|
||||||
|
<menuitem
|
||||||
|
label="@load(each) @converter(vm.locConverter)"
|
||||||
|
onClick="@command('insertField2Fx', form=fx, property='newReqTemplate.text', field=each)" />
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
<menupopup
|
||||||
|
id="fieldsAuth"
|
||||||
|
children="@load(vm.requirementFields)">
|
||||||
|
<template name="children">
|
||||||
|
<menuitem
|
||||||
|
label="@load(each) @converter(vm.locConverter)"
|
||||||
|
onClick="@command('insertField2Fx', form=fx, property='authReqTemplate.text', field=each)" />
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
<menupopup
|
||||||
|
id="fieldsConfirm"
|
||||||
|
children="@load(vm.requirementFields)">
|
||||||
|
<template name="children">
|
||||||
|
<menuitem
|
||||||
|
label="@load(each) @converter(vm.locConverter)"
|
||||||
|
onClick="@command('insertField2Fx', form=fx, property='confReqTemplate.text', field=each)" />
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
<menupopup
|
||||||
|
id="fieldsConfirmPass"
|
||||||
|
children="@load(vm.requirementFields)">
|
||||||
|
<template name="children">
|
||||||
|
<menuitem
|
||||||
|
label="@load(each) @converter(vm.locConverter)"
|
||||||
|
onClick="@command('insertField2Fx', form=fx, property='confReqTripPassenger.text', field=each)" />
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
|
<menupopup
|
||||||
|
id="fieldsPassenger"
|
||||||
|
children="@load(vm.requirementFields)">
|
||||||
|
<template name="children">
|
||||||
|
<menuitem
|
||||||
|
label="@load(each) @converter(vm.locConverter)"
|
||||||
|
onClick="@command('insertField2Fx', form=fx, property='reqPassenger.text', field=each)" />
|
||||||
|
</template>
|
||||||
|
</menupopup>
|
||||||
</zk>
|
</zk>
|
Loading…
Reference in New Issue