Skip to content

Commit

Permalink
Better handling of sl-textarea values
Browse files Browse the repository at this point in the history
  • Loading branch information
computate committed Sep 8, 2024
1 parent 49ddc49 commit 8bcc761
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/main/java/org/computate/frFR/java/EcrirePageClasse.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ else if("LocalDate".equals(entiteNomSimple)) {
// if(entiteDescription != null)
// tl(16, "title=\"", entiteDescription, " (", langueConfig.getString(ConfigCles.var_DDDashMMDashYYYY), ")\"");
// tl(5, "value=\", ", entiteVar, " == null ? \"\" : DateTimeFormatter.ofPattern(\"", langueConfig.getString(ConfigCles.var_ddDashMMDashyyyy), "\").format(", entiteVar, "));");
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}\"");
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, " | e }}\"");
tl(1, "{%- if 'Page' == ", langueConfig.getString(I18n.var_classeApiMethodeMethode), " %}");
tl(1, "{%- endif %}");
tl(11, "data-", classeModele ? classeVarClePrimaire : classeVarCleUnique, "=\"{{ ", classeModele ? classeVarClePrimaire : classeVarCleUnique, " }}\"");
Expand Down Expand Up @@ -417,7 +417,7 @@ else if("LocalDateTime".equals(entiteNomSimple) || "ZonedDateTime".equals(entite
tl(11, "data-timeformat=\"", langueConfig.getString(I18n.str_ddDashMMDashyyyy_HHColonmm_VV), "\"");
tl(11, "id=\"{{", langueConfig.getString(I18n.var_classeApiMethodeMethode), "}}_", entiteVar, "\"");
// tl(4, ".a(\"value\", ", entiteVar, " == null ? \"\" : DateTimeFormatter.ofPattern(\"", langueConfig.getString(ConfigCles.var_EEE_d_MMM_yyyy_HAposhAposmmColonss_zz_VV), "\").format(", entiteVar, "));");
tl(11, "value=\"{%- if ", uncapitalizeClasseNomSimple, "_.", entiteVar, " is defined %}{{ formatZonedDateTime(", uncapitalizeClasseNomSimple, "_.", entiteVar, ", \"", langueConfig.getString(I18n.str_ddDashMMDashyyyy_HHColonmm_VV), "\", defaultLocaleId, defaultZoneId) }}{%- endif %}\"");
tl(11, "value=\"{%- if ", uncapitalizeClasseNomSimple, "_.", entiteVar, " is defined %}{{ formatZonedDateTime(", uncapitalizeClasseNomSimple, "_.", entiteVar, ", \"", langueConfig.getString(I18n.str_ddDashMMDashyyyy_HHColonmm_VV), "\", defaultLocaleId, defaultZoneId) | e }}{%- endif %}\"");
tl(1, "{%- if 'Page' == ", langueConfig.getString(I18n.var_classeApiMethodeMethode), " %}");
tl(1, "{%- endif %}");
tl(11, "data-", classeModele ? classeVarClePrimaire : classeVarCleUnique, "=\"{{ ", classeModele ? classeVarClePrimaire : classeVarCleUnique, " }}\"");
Expand Down Expand Up @@ -453,7 +453,7 @@ else if("LocalTime".equals(entiteNomSimple)) {
tl(11, "class=\"label-on-left timepicker set", entiteVarCapitalise, " class", classeNomSimple, " input", classeNomSimple, "{{", classeModele ? classeVarClePrimaire : classeVarCleUnique, "}}", entiteVarCapitalise, " \"");
tl(11, "placeholder=\"", langueConfig.getString(I18n.var_HHColonMM), "\"");
tl(11, "id=\"{{", langueConfig.getString(I18n.var_classeApiMethodeMethode), "}}_", entiteVar, "\"");
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}\"");
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, " | e }}\"");
tl(11, "data-", classeModele ? classeVarClePrimaire : classeVarCleUnique, "=\"{{ ", classeModele ? classeVarClePrimaire : classeVarCleUnique, " }}\"");
tl(11, "></sl-input>");
}
Expand Down Expand Up @@ -546,7 +546,7 @@ else if(entiteImageBase64Url != null) {

tl(10, "<h5>", langueConfig.getString(I18n.str_Télécharger_image), "</h5>");
tl(10, "<form method=\"POST\" enctype=\"multipart/form-data\" action=\"", entiteImageBase64Url, "\" class=\"\">");
tl(11, "<input type=\"hidden\" name=\"", classeModele ? classeVarClePrimaire : classeVarCleUnique, "\" value=\"{{", classeModele ? classeVarClePrimaire : classeVarCleUnique, "}}\"/>");
tl(11, "<input type=\"hidden\" name=\"", classeModele ? classeVarClePrimaire : classeVarCleUnique, "\" value=\"{{", classeModele ? classeVarClePrimaire : classeVarCleUnique, " | e }}\"/>");
tl(11, "<input type=\"hidden\" name=\"", langueConfig.getString(I18n.var_classeNomSimple), "\" value=\"", classeNomSimple, "\"/>");
tl(11, "<sl-input name=\"", langueConfig.getString(I18n.var_fichier), "\" type=\"file\" onchange=\"fetch('", entiteImageBase64Url, "', { method: 'POST', body: new FormData(this.form)}); \"></sl-input>");
tl(10, "</form>");
Expand Down Expand Up @@ -594,7 +594,7 @@ else if(BooleanUtils.isTrue(entiteSignature)) {
}
else {
if(entiteMultiligne)
tl(9, "<sl-textarea");
tl(9, "<sl-textarea resize=\"auto\"");
else {
tl(9, "<sl-input");
}
Expand Down Expand Up @@ -632,14 +632,20 @@ else if(BooleanUtils.isTrue(entiteSignature)) {
tl(1, "{%- endif %}");

if(entiteMultiligne) {
tl(11, ">", "{{", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}");
tl(0, "{%- if \"Page\" == ", langueConfig.getString(I18n.var_classeApiMethodeMethode), " %}");
if("JsonArray".equals(entiteNomSimpleVertxJson) || "JsonObject".equals(entiteNomSimpleVertxJson))
tl(11, "value=\"{{ to", entiteNomSimpleVertxJson, "String(", uncapitalizeClasseNomSimple, "_.", entiteVar, ") | e }}\"");
else
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, " | e }}\"");
tl(0, "{%- endif %}");
tl(11, ">");
}
else {
tl(1, "{%- if \"Page\" == ", langueConfig.getString(I18n.var_classeApiMethodeMethode), " %}");
if("JsonArray".equals(entiteNomSimpleVertxJson) || "JsonObject".equals(entiteNomSimpleVertxJson))
tl(11, "value=\"{{ to", entiteNomSimpleVertxJson, "String(", uncapitalizeClasseNomSimple, "_.", entiteVar, ") }}\"");
tl(11, "value=\"{{ to", entiteNomSimpleVertxJson, "String(", uncapitalizeClasseNomSimple, "_.", entiteVar, ") | e }}\"");
else
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, "}}\"");
tl(11, "value=\"{{", uncapitalizeClasseNomSimple, "_.", entiteVar, " | e }}\"");
tl(1, "{%- endif %}");
}

Expand Down

0 comments on commit 8bcc761

Please sign in to comment.