@cronapp/templates 2.9.1-SP.6 → 2.9.1-SP.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file/crud/phonegap_crud_view/__FileName__.view.html.ftl +9 -9
- package/package.json +1 -1
- package/project/M/cronapp-rad-project-mobile-cordova/src/main/mobileapp/www/www-autenticacao/views/logged/user.view.html +4 -4
- package/project/M/cronapp-rad-project-mobile-cordova/src/main/mobileapp/www/www-autenticacao/views/login.view.html.ftl +2 -2
- package/templates/low-code/data-layer/ENTITIES.ftl +26 -12
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
</div>
|
|
101
101
|
<#elseif field.isDate() >
|
|
102
102
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
103
|
-
data-component="crn-input-floating">
|
|
103
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
104
104
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
105
105
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="date"
|
|
106
106
|
placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</label>
|
|
112
112
|
<#elseif field.isTimestamp()>
|
|
113
113
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
114
|
-
data-component="crn-input-floating">
|
|
114
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
115
115
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
116
116
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
117
117
|
type="datetime"
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
</label>
|
|
124
124
|
<#elseif field.isTime()>
|
|
125
125
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
126
|
-
data-component="crn-input-floating">
|
|
126
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
127
127
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
128
128
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="time"
|
|
129
129
|
placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
</label>
|
|
135
135
|
<#elseif field.isNumber() >
|
|
136
136
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
137
|
-
data-component="crn-input-floating">
|
|
137
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
138
138
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
139
139
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="integer"
|
|
140
140
|
placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
</label>
|
|
146
146
|
<#elseif (field.isByte() || field.isInteger()) >
|
|
147
147
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
148
|
-
data-component="crn-input-floating">
|
|
148
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
149
149
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
150
150
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
151
151
|
type="integer"
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</label>
|
|
158
158
|
<#elseif field.isLong() >
|
|
159
159
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
160
|
-
data-component="crn-input-floating">
|
|
160
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
161
161
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
162
162
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
163
163
|
type="number"
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
</label>
|
|
170
170
|
<#elseif field.isDecimal() >
|
|
171
171
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
172
|
-
data-component="crn-input-floating">
|
|
172
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
173
173
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
174
174
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="number"
|
|
175
175
|
placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
</label>
|
|
181
181
|
<#elseif field.isChar() >
|
|
182
182
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
183
|
-
data-component="crn-input-floating">
|
|
183
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
184
184
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
185
185
|
<input aria-label="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>" type="text" maxlength="1"
|
|
186
186
|
placeholder="<#if field.label?has_content>${field.label}<#else>${field.name}</#if>"
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
</div>
|
|
233
233
|
<#else>
|
|
234
234
|
<label for="textinput-${field.name}-${model.random}" class="item item-input item-stacked-label"
|
|
235
|
-
data-component="crn-input-floating">
|
|
235
|
+
data-component="crn-input-floating" id="lbl-${field.name}-${model.random}">
|
|
236
236
|
<span class="input-label">${model.formMapLabels[field.name]!}</span>
|
|
237
237
|
<input
|
|
238
238
|
type="text"
|
package/package.json
CHANGED
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
<input type="hidden" name="csrf_token" value="CIwNZNlR4XbisJF39I8yWnWX9wX4WFoz" />
|
|
36
36
|
<div class="list" ng-disabled="!User.editing && !User.inserting">
|
|
37
37
|
<!-- email begin -->
|
|
38
|
-
<label for="textinput-email" class="item item-input item-stacked-label" data-component="crn-input-floating">
|
|
38
|
+
<label for="textinput-email" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-email">
|
|
39
39
|
<span>Email</span>
|
|
40
40
|
<input aria-label="Email" type="text" placeholder="Email" ng-model="User.active.email" id="textinput-email" name="textinput-email">
|
|
41
41
|
</label>
|
|
42
42
|
<!-- name begin -->
|
|
43
|
-
<label for="textinput-name" class="item item-input item-stacked-label" data-component="crn-input-floating">
|
|
43
|
+
<label for="textinput-name" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-name">
|
|
44
44
|
<span>{{'Users.view.Name' | translate}}</span>
|
|
45
45
|
<input aria-label="{{'Users.view.Name' | translate}}" type="text" placeholder="{{'Users.view.Name' | translate}}" ng-model="User.active.name" id="textinput-name" name="textinput-name" required="required">
|
|
46
46
|
</label>
|
|
47
47
|
<!-- login begin -->
|
|
48
|
-
<label for="textinput-login" class="item item-input item-stacked-label" data-component="crn-input-floating">
|
|
48
|
+
<label for="textinput-login" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-login">
|
|
49
49
|
<span>{{'Users.view.Login' | translate}}</span>
|
|
50
50
|
<input aria-label="{{'Users.view.Login' | translate}}" type="text" placeholder="{{'Users.view.Login' | translate}}" ng-model="User.active.userName" id="textinput-login" name="textinput-login" required="required">
|
|
51
51
|
</label>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
</div>
|
|
60
60
|
</div>
|
|
61
61
|
<!-- password begin -->
|
|
62
|
-
<label for="textinput-password" class="item item-input item-stacked-label" data-component="crn-input-floating">
|
|
62
|
+
<label for="textinput-password" class="item item-input item-stacked-label" data-component="crn-input-floating" id="lbl-textinput-password">
|
|
63
63
|
<span>{{'Home.view.Password' | translate}}</span>
|
|
64
64
|
<input type="password" aria-label="{{'Home.view.Password' | translate}}" type="text" placeholder="{{'Home.view.Password' | translate}}" ng-model="User.active.password" id="textinput-password" name="textinput-password" required="required">
|
|
65
65
|
</label>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<input type="hidden" name="csrf_token" value="CIwNZNlR4XbisJF39I8yWnWX9wX4WFoz">
|
|
11
11
|
<div class="list list-inset login-mobile" data-container="true">
|
|
12
12
|
|
|
13
|
-
<div class="item item-input component-holder" data-component="crn-input" for="crn-input-username" title="{{'Login.view.Username' | translate}}">
|
|
13
|
+
<div class="item item-input component-holder" data-component="crn-input" for="crn-input-username" title="{{'Login.view.Username' | translate}}" id="lbl-input-username">
|
|
14
14
|
<input aria-label="{{'Login.view.Username' | translate}}" autocomplete="username" autocorrect="off" autocapitalize="off" type="text" placeholder="{{'Login.view.Username' | translate}}" ng-model="vars.username" id="crn-input-username" keyboard="username">
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
<div class="item item-input component-holder" data-component="crn-input" for="crn-input-password" title="{{'Login.view.Password' | translate}}">
|
|
17
|
+
<div class="item item-input component-holder" data-component="crn-input" for="crn-input-password" title="{{'Login.view.Password' | translate}}" id="lbl-input-password">
|
|
18
18
|
<input aria-label="{{'Login.view.Password' | translate}}" autocomplete="current-password" type="password" placeholder="{{'Login.view.Password' | translate}}" ng-model="vars.password" id="crn-input-password" keyboard="password">
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
* @generated
|
|
19
19
|
*/
|
|
20
20
|
public ${classClass.name} set${fieldName?cap_first}(${field.type} ${fieldName}) {
|
|
21
|
-
<#if field.isEncryption() &&
|
|
21
|
+
<#if field.isEncryption() && field.getPasswordPolicy() != "full">
|
|
22
22
|
this.${fieldName} = ${fieldName}.startsWith(ENCRYPT) ? ${fieldName} : new BCryptPasswordEncoder().encode(${fieldName});
|
|
23
23
|
<#else>
|
|
24
24
|
this.${fieldName} = ${fieldName};
|
|
25
|
-
</#if>
|
|
25
|
+
</#if>
|
|
26
26
|
return this;
|
|
27
27
|
}
|
|
28
|
-
</#macro>
|
|
28
|
+
</#macro>
|
|
29
29
|
|
|
30
30
|
package ${entityPackage}<#if subPackage??>.${subPackage}</#if>;
|
|
31
31
|
|
|
@@ -39,13 +39,16 @@ import cronapi.rest.security.CronappSecurity;
|
|
|
39
39
|
<#if clazz.rest>
|
|
40
40
|
import cronapi.swagger.CronappSwagger;
|
|
41
41
|
</#if>
|
|
42
|
-
<#if clazz.hasRowVersion() || clazz.hasXML()>
|
|
42
|
+
<#if clazz.hasRowVersion() || clazz.hasXML() || clazz.hasUUID()>
|
|
43
43
|
import org.eclipse.persistence.annotations.Convert;
|
|
44
44
|
import org.eclipse.persistence.annotations.Converter;
|
|
45
45
|
</#if>
|
|
46
46
|
<#if clazz.hasRowVersion()>
|
|
47
47
|
import cronapi.database.VersionConverter;
|
|
48
48
|
</#if>
|
|
49
|
+
<#if clazz.hasUUID()>
|
|
50
|
+
import cronapi.database.UUIDConverter;
|
|
51
|
+
</#if>
|
|
49
52
|
<#if clazz.hasUseOuterJoin()?? && clazz.hasUseOuterJoin()>
|
|
50
53
|
import org.eclipse.persistence.annotations.JoinFetch;
|
|
51
54
|
import org.eclipse.persistence.annotations.JoinFetchType;
|
|
@@ -68,9 +71,8 @@ import cronapi.database.ByteConverter;
|
|
|
68
71
|
import cronapp.framework.persistence.ValidPassword;
|
|
69
72
|
import cronapp.framework.persistence.ValidPasswords;
|
|
70
73
|
import cronapp.framework.persistence.PasswordEncoderListener;
|
|
71
|
-
<#else>
|
|
72
|
-
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
73
74
|
</#if>
|
|
75
|
+
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
74
76
|
</#if>
|
|
75
77
|
<#list clazz.imports as import>
|
|
76
78
|
import ${import};
|
|
@@ -104,7 +106,7 @@ import org.eclipse.persistence.annotations.*;
|
|
|
104
106
|
</#if>
|
|
105
107
|
_0", columnNames={
|
|
106
108
|
<#list clazz.fieldsUniqueKey as field>
|
|
107
|
-
"${field.dbFieldName}"
|
|
109
|
+
"${field.dbFieldName}"
|
|
108
110
|
<#if field?has_next>
|
|
109
111
|
,
|
|
110
112
|
</#if>
|
|
@@ -147,17 +149,23 @@ import org.eclipse.persistence.annotations.*;
|
|
|
147
149
|
converterClass=ByteConverter.class
|
|
148
150
|
)
|
|
149
151
|
</#if>
|
|
152
|
+
<#if clazz.hasUUID()>
|
|
153
|
+
@Converter(
|
|
154
|
+
name="uuid",
|
|
155
|
+
converterClass=UUIDConverter.class
|
|
156
|
+
)
|
|
157
|
+
</#if>
|
|
150
158
|
<#if clazz.hasStrongPassword() && clazz.hasEncryption()>
|
|
151
159
|
@ValidPasswords({
|
|
152
160
|
<#list clazz.fields as field>
|
|
153
|
-
<#if field.isEncryption()>
|
|
161
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
154
162
|
@ValidPassword(passwordProperty = "${field.name}", passwordHistoryProperty = "${field.name}History"),
|
|
155
163
|
</#if>
|
|
156
164
|
</#list>
|
|
157
|
-
})
|
|
165
|
+
})
|
|
158
166
|
</#if>
|
|
159
167
|
public class ${clazz.name} implements Serializable {
|
|
160
|
-
<#if clazz.hasEncryption()
|
|
168
|
+
<#if clazz.hasEncryption()>
|
|
161
169
|
/**
|
|
162
170
|
* Variável privada para verificação da criptofrafia
|
|
163
171
|
*
|
|
@@ -185,6 +193,9 @@ public class ${clazz.name} implements Serializable {
|
|
|
185
193
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
186
194
|
</#if>
|
|
187
195
|
</#if>
|
|
196
|
+
<#if (field.isUUID())!false>
|
|
197
|
+
@Convert("uuid")
|
|
198
|
+
</#if>
|
|
188
199
|
<#if field.isVersion()>
|
|
189
200
|
@Version
|
|
190
201
|
<#elseif field.isDate()>
|
|
@@ -225,6 +236,9 @@ public class ${clazz.name} implements Serializable {
|
|
|
225
236
|
*/
|
|
226
237
|
<#if (field.rowVersion)!false>
|
|
227
238
|
@Convert("version")
|
|
239
|
+
</#if>
|
|
240
|
+
<#if (field.isUUID())!false>
|
|
241
|
+
@Convert("uuid")
|
|
228
242
|
</#if>
|
|
229
243
|
<#if (field.XML)!false>
|
|
230
244
|
@Convert("bytes")
|
|
@@ -288,7 +302,7 @@ public class ${clazz.name} implements Serializable {
|
|
|
288
302
|
${field.modifier} <#if field.arrayRelation>${field.type}<#else>${field.type}</#if> ${field.name}<#if field.defaultValue?has_content> = ${field.defaultValue}</#if>;
|
|
289
303
|
</#if>
|
|
290
304
|
|
|
291
|
-
<#if field.isEncryption()>
|
|
305
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
292
306
|
/**
|
|
293
307
|
* @generated
|
|
294
308
|
*/
|
|
@@ -309,7 +323,7 @@ public class ${clazz.name} implements Serializable {
|
|
|
309
323
|
|
|
310
324
|
<#list clazz.fields as field>
|
|
311
325
|
<@getter_setter clazz field "${field.name}" />
|
|
312
|
-
<#if field.isEncryption()>
|
|
326
|
+
<#if field.isEncryption() && field.getPasswordPolicy() == "full">
|
|
313
327
|
<@getter_setter clazz field "${field.name}History" />
|
|
314
328
|
</#if>
|
|
315
329
|
</#list>
|