@gov-cy/govcy-frontend-renderer 1.3.0 → 1.4.0
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.
|
@@ -892,6 +892,581 @@ root: root
|
|
|
892
892
|
})();
|
|
893
893
|
})();
|
|
894
894
|
|
|
895
|
+
(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["elements/dateInput.njk"] = (function() {
|
|
896
|
+
function root(env, context, frame, runtime, cb) {
|
|
897
|
+
var lineno = 0;
|
|
898
|
+
var colno = 0;
|
|
899
|
+
var output = "";
|
|
900
|
+
try {
|
|
901
|
+
var parentTemplate = null;
|
|
902
|
+
output += "\n";
|
|
903
|
+
output += "\n";
|
|
904
|
+
var macro_t_1 = runtime.makeMacro(
|
|
905
|
+
["params"],
|
|
906
|
+
[],
|
|
907
|
+
function (l_params, kwargs) {
|
|
908
|
+
var callerFrame = frame;
|
|
909
|
+
frame = new runtime.Frame();
|
|
910
|
+
kwargs = kwargs || {};
|
|
911
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
912
|
+
frame.set("caller", kwargs.caller); }
|
|
913
|
+
frame.set("params", l_params);
|
|
914
|
+
var t_2 = "";var t_3;
|
|
915
|
+
t_3 = env.getFilter("default").call(context, runtime.memberLookup((l_params),"isPageHeading"),false);
|
|
916
|
+
frame.set("isPageHeading", t_3, true);
|
|
917
|
+
if(frame.topLevel) {
|
|
918
|
+
context.setVariable("isPageHeading", t_3);
|
|
919
|
+
}
|
|
920
|
+
if(frame.topLevel) {
|
|
921
|
+
context.addExport("isPageHeading", t_3);
|
|
922
|
+
}
|
|
923
|
+
var t_4;
|
|
924
|
+
t_4 = env.getFilter("default").call(context, runtime.memberLookup((l_params),"variant"),"mobile");
|
|
925
|
+
frame.set("variant", t_4, true);
|
|
926
|
+
if(frame.topLevel) {
|
|
927
|
+
context.setVariable("variant", t_4);
|
|
928
|
+
}
|
|
929
|
+
if(frame.topLevel) {
|
|
930
|
+
context.addExport("variant", t_4);
|
|
931
|
+
}
|
|
932
|
+
if(runtime.memberLookup((l_params),"legend") && runtime.memberLookup((l_params),"id") && runtime.memberLookup((l_params),"name")) {
|
|
933
|
+
env.getTemplate("utilities/govcyUtilities.njk", false, "elements/dateInput.njk", false, function(t_6,t_5) {
|
|
934
|
+
if(t_6) { cb(t_6); return; }
|
|
935
|
+
t_5.getExported(function(t_7,t_5) {
|
|
936
|
+
if(t_7) { cb(t_7); return; }
|
|
937
|
+
if(Object.prototype.hasOwnProperty.call(t_5, "govcyLocalizeContent")) {
|
|
938
|
+
var t_8 = t_5.govcyLocalizeContent;
|
|
939
|
+
} else {
|
|
940
|
+
cb(new Error("cannot import 'govcyLocalizeContent'")); return;
|
|
941
|
+
}
|
|
942
|
+
context.setVariable("govcyLocalizeContent", t_8);
|
|
943
|
+
if(Object.prototype.hasOwnProperty.call(t_5, "govcyLangAttribute")) {
|
|
944
|
+
var t_9 = t_5.govcyLangAttribute;
|
|
945
|
+
} else {
|
|
946
|
+
cb(new Error("cannot import 'govcyLangAttribute'")); return;
|
|
947
|
+
}
|
|
948
|
+
context.setVariable("govcyLangAttribute", t_9);
|
|
949
|
+
env.getTemplate("elements/fieldset.njk", false, "elements/dateInput.njk", false, function(t_11,t_10) {
|
|
950
|
+
if(t_11) { cb(t_11); return; }
|
|
951
|
+
t_10.getExported(function(t_12,t_10) {
|
|
952
|
+
if(t_12) { cb(t_12); return; }
|
|
953
|
+
if(Object.prototype.hasOwnProperty.call(t_10, "fieldset")) {
|
|
954
|
+
var t_13 = t_10.fieldset;
|
|
955
|
+
} else {
|
|
956
|
+
cb(new Error("cannot import 'fieldset'")); return;
|
|
957
|
+
}
|
|
958
|
+
context.setVariable("fieldset", t_13);
|
|
959
|
+
env.getTemplate("elements/hint.njk", false, "elements/dateInput.njk", false, function(t_15,t_14) {
|
|
960
|
+
if(t_15) { cb(t_15); return; }
|
|
961
|
+
t_14.getExported(function(t_16,t_14) {
|
|
962
|
+
if(t_16) { cb(t_16); return; }
|
|
963
|
+
if(Object.prototype.hasOwnProperty.call(t_14, "hint")) {
|
|
964
|
+
var t_17 = t_14.hint;
|
|
965
|
+
} else {
|
|
966
|
+
cb(new Error("cannot import 'hint'")); return;
|
|
967
|
+
}
|
|
968
|
+
context.setVariable("hint", t_17);
|
|
969
|
+
env.getTemplate("elements/legend.njk", false, "elements/dateInput.njk", false, function(t_19,t_18) {
|
|
970
|
+
if(t_19) { cb(t_19); return; }
|
|
971
|
+
t_18.getExported(function(t_20,t_18) {
|
|
972
|
+
if(t_20) { cb(t_20); return; }
|
|
973
|
+
if(Object.prototype.hasOwnProperty.call(t_18, "legend")) {
|
|
974
|
+
var t_21 = t_18.legend;
|
|
975
|
+
} else {
|
|
976
|
+
cb(new Error("cannot import 'legend'")); return;
|
|
977
|
+
}
|
|
978
|
+
context.setVariable("legend", t_21);
|
|
979
|
+
env.getTemplate("elements/errorMessage.njk", false, "elements/dateInput.njk", false, function(t_23,t_22) {
|
|
980
|
+
if(t_23) { cb(t_23); return; }
|
|
981
|
+
t_22.getExported(function(t_24,t_22) {
|
|
982
|
+
if(t_24) { cb(t_24); return; }
|
|
983
|
+
if(Object.prototype.hasOwnProperty.call(t_22, "errorMessage")) {
|
|
984
|
+
var t_25 = t_22.errorMessage;
|
|
985
|
+
} else {
|
|
986
|
+
cb(new Error("cannot import 'errorMessage'")); return;
|
|
987
|
+
}
|
|
988
|
+
context.setVariable("errorMessage", t_25);
|
|
989
|
+
env.getTemplate("elements/formControl.njk", false, "elements/dateInput.njk", false, function(t_27,t_26) {
|
|
990
|
+
if(t_27) { cb(t_27); return; }
|
|
991
|
+
t_26.getExported(function(t_28,t_26) {
|
|
992
|
+
if(t_28) { cb(t_28); return; }
|
|
993
|
+
if(Object.prototype.hasOwnProperty.call(t_26, "formControl")) {
|
|
994
|
+
var t_29 = t_26.formControl;
|
|
995
|
+
} else {
|
|
996
|
+
cb(new Error("cannot import 'formControl'")); return;
|
|
997
|
+
}
|
|
998
|
+
context.setVariable("formControl", t_29);
|
|
999
|
+
var t_30;
|
|
1000
|
+
t_30 = (lineno = 32, colno = 43, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "Day","el": "Μέρα"},runtime.memberLookup((l_params),"lang")]));
|
|
1001
|
+
frame.set("dayLabel", t_30, true);
|
|
1002
|
+
if(frame.topLevel) {
|
|
1003
|
+
context.setVariable("dayLabel", t_30);
|
|
1004
|
+
}
|
|
1005
|
+
if(frame.topLevel) {
|
|
1006
|
+
context.addExport("dayLabel", t_30);
|
|
1007
|
+
}
|
|
1008
|
+
var t_31;
|
|
1009
|
+
t_31 = (lineno = 33, colno = 45, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "Month","el": "Μήνας"},runtime.memberLookup((l_params),"lang")]));
|
|
1010
|
+
frame.set("monthLabel", t_31, true);
|
|
1011
|
+
if(frame.topLevel) {
|
|
1012
|
+
context.setVariable("monthLabel", t_31);
|
|
1013
|
+
}
|
|
1014
|
+
if(frame.topLevel) {
|
|
1015
|
+
context.addExport("monthLabel", t_31);
|
|
1016
|
+
}
|
|
1017
|
+
var t_32;
|
|
1018
|
+
t_32 = (lineno = 34, colno = 44, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "Year","el": "Χρόνος"},runtime.memberLookup((l_params),"lang")]));
|
|
1019
|
+
frame.set("yearLabel", t_32, true);
|
|
1020
|
+
if(frame.topLevel) {
|
|
1021
|
+
context.setVariable("yearLabel", t_32);
|
|
1022
|
+
}
|
|
1023
|
+
if(frame.topLevel) {
|
|
1024
|
+
context.addExport("yearLabel", t_32);
|
|
1025
|
+
}
|
|
1026
|
+
var t_33;
|
|
1027
|
+
t_33 = (lineno = 35, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "January","el": "Ιανουάριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1028
|
+
frame.set("monthValue1", t_33, true);
|
|
1029
|
+
if(frame.topLevel) {
|
|
1030
|
+
context.setVariable("monthValue1", t_33);
|
|
1031
|
+
}
|
|
1032
|
+
if(frame.topLevel) {
|
|
1033
|
+
context.addExport("monthValue1", t_33);
|
|
1034
|
+
}
|
|
1035
|
+
var t_34;
|
|
1036
|
+
t_34 = (lineno = 36, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "February","el": "Φεβρουάριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1037
|
+
frame.set("monthValue2", t_34, true);
|
|
1038
|
+
if(frame.topLevel) {
|
|
1039
|
+
context.setVariable("monthValue2", t_34);
|
|
1040
|
+
}
|
|
1041
|
+
if(frame.topLevel) {
|
|
1042
|
+
context.addExport("monthValue2", t_34);
|
|
1043
|
+
}
|
|
1044
|
+
var t_35;
|
|
1045
|
+
t_35 = (lineno = 37, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "March","el": "Μάρτιος"},runtime.memberLookup((l_params),"lang")]));
|
|
1046
|
+
frame.set("monthValue3", t_35, true);
|
|
1047
|
+
if(frame.topLevel) {
|
|
1048
|
+
context.setVariable("monthValue3", t_35);
|
|
1049
|
+
}
|
|
1050
|
+
if(frame.topLevel) {
|
|
1051
|
+
context.addExport("monthValue3", t_35);
|
|
1052
|
+
}
|
|
1053
|
+
var t_36;
|
|
1054
|
+
t_36 = (lineno = 38, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "April","el": "Απρίλιος"},runtime.memberLookup((l_params),"lang")]));
|
|
1055
|
+
frame.set("monthValue4", t_36, true);
|
|
1056
|
+
if(frame.topLevel) {
|
|
1057
|
+
context.setVariable("monthValue4", t_36);
|
|
1058
|
+
}
|
|
1059
|
+
if(frame.topLevel) {
|
|
1060
|
+
context.addExport("monthValue4", t_36);
|
|
1061
|
+
}
|
|
1062
|
+
var t_37;
|
|
1063
|
+
t_37 = (lineno = 39, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "May","el": "Μάϊος"},runtime.memberLookup((l_params),"lang")]));
|
|
1064
|
+
frame.set("monthValue5", t_37, true);
|
|
1065
|
+
if(frame.topLevel) {
|
|
1066
|
+
context.setVariable("monthValue5", t_37);
|
|
1067
|
+
}
|
|
1068
|
+
if(frame.topLevel) {
|
|
1069
|
+
context.addExport("monthValue5", t_37);
|
|
1070
|
+
}
|
|
1071
|
+
var t_38;
|
|
1072
|
+
t_38 = (lineno = 40, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "June","el": "Ιούνιος"},runtime.memberLookup((l_params),"lang")]));
|
|
1073
|
+
frame.set("monthValue6", t_38, true);
|
|
1074
|
+
if(frame.topLevel) {
|
|
1075
|
+
context.setVariable("monthValue6", t_38);
|
|
1076
|
+
}
|
|
1077
|
+
if(frame.topLevel) {
|
|
1078
|
+
context.addExport("monthValue6", t_38);
|
|
1079
|
+
}
|
|
1080
|
+
var t_39;
|
|
1081
|
+
t_39 = (lineno = 41, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "July","el": "Ιούλιος"},runtime.memberLookup((l_params),"lang")]));
|
|
1082
|
+
frame.set("monthValue7", t_39, true);
|
|
1083
|
+
if(frame.topLevel) {
|
|
1084
|
+
context.setVariable("monthValue7", t_39);
|
|
1085
|
+
}
|
|
1086
|
+
if(frame.topLevel) {
|
|
1087
|
+
context.addExport("monthValue7", t_39);
|
|
1088
|
+
}
|
|
1089
|
+
var t_40;
|
|
1090
|
+
t_40 = (lineno = 42, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "August","el": "Αύγουστος"},runtime.memberLookup((l_params),"lang")]));
|
|
1091
|
+
frame.set("monthValue8", t_40, true);
|
|
1092
|
+
if(frame.topLevel) {
|
|
1093
|
+
context.setVariable("monthValue8", t_40);
|
|
1094
|
+
}
|
|
1095
|
+
if(frame.topLevel) {
|
|
1096
|
+
context.addExport("monthValue8", t_40);
|
|
1097
|
+
}
|
|
1098
|
+
var t_41;
|
|
1099
|
+
t_41 = (lineno = 43, colno = 46, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "September","el": "Σεπτέμβριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1100
|
+
frame.set("monthValue9", t_41, true);
|
|
1101
|
+
if(frame.topLevel) {
|
|
1102
|
+
context.setVariable("monthValue9", t_41);
|
|
1103
|
+
}
|
|
1104
|
+
if(frame.topLevel) {
|
|
1105
|
+
context.addExport("monthValue9", t_41);
|
|
1106
|
+
}
|
|
1107
|
+
var t_42;
|
|
1108
|
+
t_42 = (lineno = 44, colno = 47, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "October","el": "Οκτώβριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1109
|
+
frame.set("monthValue10", t_42, true);
|
|
1110
|
+
if(frame.topLevel) {
|
|
1111
|
+
context.setVariable("monthValue10", t_42);
|
|
1112
|
+
}
|
|
1113
|
+
if(frame.topLevel) {
|
|
1114
|
+
context.addExport("monthValue10", t_42);
|
|
1115
|
+
}
|
|
1116
|
+
var t_43;
|
|
1117
|
+
t_43 = (lineno = 45, colno = 47, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "November","el": "Νοέμβριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1118
|
+
frame.set("monthValue11", t_43, true);
|
|
1119
|
+
if(frame.topLevel) {
|
|
1120
|
+
context.setVariable("monthValue11", t_43);
|
|
1121
|
+
}
|
|
1122
|
+
if(frame.topLevel) {
|
|
1123
|
+
context.addExport("monthValue11", t_43);
|
|
1124
|
+
}
|
|
1125
|
+
var t_44;
|
|
1126
|
+
t_44 = (lineno = 46, colno = 47, runtime.callWrap(t_8, "govcyLocalizeContent", context, [{"en": "December","el": "Δεκέμβριος"},runtime.memberLookup((l_params),"lang")]));
|
|
1127
|
+
frame.set("monthValue12", t_44, true);
|
|
1128
|
+
if(frame.topLevel) {
|
|
1129
|
+
context.setVariable("monthValue12", t_44);
|
|
1130
|
+
}
|
|
1131
|
+
if(frame.topLevel) {
|
|
1132
|
+
context.addExport("monthValue12", t_44);
|
|
1133
|
+
}
|
|
1134
|
+
if(runtime.memberLookup((l_params),"hint")) {
|
|
1135
|
+
var t_45;
|
|
1136
|
+
t_45 = env.getFilter("join").call(context, [runtime.memberLookup((l_params),"id"),"-hint"]);
|
|
1137
|
+
frame.set("hintId", t_45, true);
|
|
1138
|
+
if(frame.topLevel) {
|
|
1139
|
+
context.setVariable("hintId", t_45);
|
|
1140
|
+
}
|
|
1141
|
+
if(frame.topLevel) {
|
|
1142
|
+
context.addExport("hintId", t_45);
|
|
1143
|
+
}
|
|
1144
|
+
;
|
|
1145
|
+
}
|
|
1146
|
+
else {
|
|
1147
|
+
var t_46;
|
|
1148
|
+
t_46 = "";
|
|
1149
|
+
frame.set("hintId", t_46, true);
|
|
1150
|
+
if(frame.topLevel) {
|
|
1151
|
+
context.setVariable("hintId", t_46);
|
|
1152
|
+
}
|
|
1153
|
+
if(frame.topLevel) {
|
|
1154
|
+
context.addExport("hintId", t_46);
|
|
1155
|
+
}
|
|
1156
|
+
;
|
|
1157
|
+
}
|
|
1158
|
+
if(runtime.memberLookup((l_params),"error")) {
|
|
1159
|
+
var t_47;
|
|
1160
|
+
t_47 = env.getFilter("join").call(context, [runtime.memberLookup((l_params),"id"),"-error"]);
|
|
1161
|
+
frame.set("errorId", t_47, true);
|
|
1162
|
+
if(frame.topLevel) {
|
|
1163
|
+
context.setVariable("errorId", t_47);
|
|
1164
|
+
}
|
|
1165
|
+
if(frame.topLevel) {
|
|
1166
|
+
context.addExport("errorId", t_47);
|
|
1167
|
+
}
|
|
1168
|
+
;
|
|
1169
|
+
}
|
|
1170
|
+
else {
|
|
1171
|
+
var t_48;
|
|
1172
|
+
t_48 = "";
|
|
1173
|
+
frame.set("errorId", t_48, true);
|
|
1174
|
+
if(frame.topLevel) {
|
|
1175
|
+
context.setVariable("errorId", t_48);
|
|
1176
|
+
}
|
|
1177
|
+
if(frame.topLevel) {
|
|
1178
|
+
context.addExport("errorId", t_48);
|
|
1179
|
+
}
|
|
1180
|
+
;
|
|
1181
|
+
}
|
|
1182
|
+
if(runtime.memberLookup((l_params),"error") || runtime.memberLookup((l_params),"hint")) {
|
|
1183
|
+
var t_49;
|
|
1184
|
+
t_49 = runtime.contextOrFrameLookup(context, frame, "hintId") + "" + " " + "" + runtime.contextOrFrameLookup(context, frame, "errorId");
|
|
1185
|
+
frame.set("ariaDescribedBy", t_49, true);
|
|
1186
|
+
if(frame.topLevel) {
|
|
1187
|
+
context.setVariable("ariaDescribedBy", t_49);
|
|
1188
|
+
}
|
|
1189
|
+
if(frame.topLevel) {
|
|
1190
|
+
context.addExport("ariaDescribedBy", t_49);
|
|
1191
|
+
}
|
|
1192
|
+
;
|
|
1193
|
+
}
|
|
1194
|
+
else {
|
|
1195
|
+
var t_50;
|
|
1196
|
+
t_50 = "";
|
|
1197
|
+
frame.set("ariaDescribedBy", t_50, true);
|
|
1198
|
+
if(frame.topLevel) {
|
|
1199
|
+
context.setVariable("ariaDescribedBy", t_50);
|
|
1200
|
+
}
|
|
1201
|
+
if(frame.topLevel) {
|
|
1202
|
+
context.addExport("ariaDescribedBy", t_50);
|
|
1203
|
+
}
|
|
1204
|
+
;
|
|
1205
|
+
}
|
|
1206
|
+
t_2 += runtime.suppressValue((lineno = 65, colno = 20, runtime.callWrap(t_13, "fieldset", context, [{"ariaDescribedby": runtime.contextOrFrameLookup(context, frame, "ariaDescribedBy"),"classes": runtime.memberLookup((l_params),"classes"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_51 = runtime.makeMacro(
|
|
1207
|
+
[],
|
|
1208
|
+
[],
|
|
1209
|
+
function (kwargs) {
|
|
1210
|
+
var callerFrame = frame;
|
|
1211
|
+
frame = frame.push(true);
|
|
1212
|
+
kwargs = kwargs || {};
|
|
1213
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
1214
|
+
frame.set("caller", kwargs.caller); }
|
|
1215
|
+
var t_52 = "";t_52 += "\n ";
|
|
1216
|
+
t_52 += runtime.suppressValue((lineno = 66, colno = 22, runtime.callWrap(t_21, "legend", context, [{"legend": runtime.memberLookup((l_params),"legend"),"isPageHeading": runtime.contextOrFrameLookup(context, frame, "isPageHeading"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_53 = runtime.makeMacro(
|
|
1217
|
+
[],
|
|
1218
|
+
[],
|
|
1219
|
+
function (kwargs) {
|
|
1220
|
+
var callerFrame = frame;
|
|
1221
|
+
frame = frame.push(true);
|
|
1222
|
+
kwargs = kwargs || {};
|
|
1223
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
1224
|
+
frame.set("caller", kwargs.caller); }
|
|
1225
|
+
var t_54 = "";;
|
|
1226
|
+
frame = frame.pop();
|
|
1227
|
+
return new runtime.SafeString(t_54);
|
|
1228
|
+
});
|
|
1229
|
+
return macro_t_53;})()})])), env.opts.autoescape);
|
|
1230
|
+
t_52 += "\n ";
|
|
1231
|
+
t_52 += runtime.suppressValue((lineno = 67, colno = 27, runtime.callWrap(t_29, "formControl", context, [{"isError": (runtime.memberLookup((l_params),"hideFormControlError")?false:runtime.memberLookup((l_params),"error"))},runtime.makeKeywordArgs({"caller": (function (){var macro_t_55 = runtime.makeMacro(
|
|
1232
|
+
[],
|
|
1233
|
+
[],
|
|
1234
|
+
function (kwargs) {
|
|
1235
|
+
var callerFrame = frame;
|
|
1236
|
+
frame = frame.push(true);
|
|
1237
|
+
kwargs = kwargs || {};
|
|
1238
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
1239
|
+
frame.set("caller", kwargs.caller); }
|
|
1240
|
+
var t_56 = "";t_56 += "\n ";
|
|
1241
|
+
t_56 += runtime.suppressValue((lineno = 68, colno = 24, runtime.callWrap(t_17, "hint", context, [{"hint": runtime.memberLookup((l_params),"hint"),"id": runtime.contextOrFrameLookup(context, frame, "hintId"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_57 = runtime.makeMacro(
|
|
1242
|
+
[],
|
|
1243
|
+
[],
|
|
1244
|
+
function (kwargs) {
|
|
1245
|
+
var callerFrame = frame;
|
|
1246
|
+
frame = frame.push(true);
|
|
1247
|
+
kwargs = kwargs || {};
|
|
1248
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
1249
|
+
frame.set("caller", kwargs.caller); }
|
|
1250
|
+
var t_58 = "";;
|
|
1251
|
+
frame = frame.pop();
|
|
1252
|
+
return new runtime.SafeString(t_58);
|
|
1253
|
+
});
|
|
1254
|
+
return macro_t_57;})()})])), env.opts.autoescape);
|
|
1255
|
+
t_56 += runtime.suppressValue((lineno = 70, colno = 32, runtime.callWrap(t_25, "errorMessage", context, [{"message": runtime.memberLookup((l_params),"error"),"id": runtime.contextOrFrameLookup(context, frame, "errorId"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_59 = runtime.makeMacro(
|
|
1256
|
+
[],
|
|
1257
|
+
[],
|
|
1258
|
+
function (kwargs) {
|
|
1259
|
+
var callerFrame = frame;
|
|
1260
|
+
frame = frame.push(true);
|
|
1261
|
+
kwargs = kwargs || {};
|
|
1262
|
+
if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {
|
|
1263
|
+
frame.set("caller", kwargs.caller); }
|
|
1264
|
+
var t_60 = "";;
|
|
1265
|
+
frame = frame.pop();
|
|
1266
|
+
return new runtime.SafeString(t_60);
|
|
1267
|
+
});
|
|
1268
|
+
return macro_t_59;})()})])), env.opts.autoescape);
|
|
1269
|
+
t_56 += "<div class=\"govcy-d-flex govcy-flex-wrap\"";
|
|
1270
|
+
t_56 += runtime.suppressValue((lineno = 72, colno = 74, runtime.callWrap(t_9, "govcyLangAttribute", context, [runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
1271
|
+
t_56 += "> \n <div class=\"govcy-d-block govcy-mr-3\">\n <label class=\"govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2\" for=\"";
|
|
1272
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1273
|
+
t_56 += "_day\">";
|
|
1274
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "dayLabel"), env.opts.autoescape);
|
|
1275
|
+
t_56 += "</label>\n <input id=\"";
|
|
1276
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1277
|
+
t_56 += "_day\" name=\"";
|
|
1278
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
1279
|
+
t_56 += "_day\" class=\"govcy-text-input govcy-text-input-char_3";
|
|
1280
|
+
if(runtime.memberLookup((l_params),"hasDayError")) {
|
|
1281
|
+
t_56 += " govcy-text-input-error";
|
|
1282
|
+
;
|
|
1283
|
+
}
|
|
1284
|
+
t_56 += "\" maxlength=\"2\" type=\"text\" pattern=\"[0-9]*\" inputmode=\"numeric\"";
|
|
1285
|
+
if(runtime.memberLookup((l_params),"isBirthday")) {
|
|
1286
|
+
t_56 += " autocomplete=\"bday-day\"";
|
|
1287
|
+
;
|
|
1288
|
+
}
|
|
1289
|
+
t_56 += ">\n </div>\n <div class=\"govcy-d-block govcy-mr-3\">\n <label class=\"govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2\" for=\"";
|
|
1290
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1291
|
+
t_56 += "_month\">";
|
|
1292
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthLabel"), env.opts.autoescape);
|
|
1293
|
+
t_56 += "</label>\n <select id=\"";
|
|
1294
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1295
|
+
t_56 += "_month\" name=\"";
|
|
1296
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
1297
|
+
t_56 += "_month\" class=\"govcy-select";
|
|
1298
|
+
if(runtime.memberLookup((l_params),"hasMonthError")) {
|
|
1299
|
+
t_56 += " govcy-select-error";
|
|
1300
|
+
;
|
|
1301
|
+
}
|
|
1302
|
+
t_56 += "\"";
|
|
1303
|
+
if(runtime.memberLookup((l_params),"isBirthday")) {
|
|
1304
|
+
t_56 += " autocomplete=\"bday-month\"";
|
|
1305
|
+
;
|
|
1306
|
+
}
|
|
1307
|
+
t_56 += ">\n <option value=\"\" selected=\"\"></option>\n <option value=\"1\">";
|
|
1308
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1309
|
+
t_56 += "1";
|
|
1310
|
+
;
|
|
1311
|
+
}
|
|
1312
|
+
else {
|
|
1313
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue1"), env.opts.autoescape);
|
|
1314
|
+
;
|
|
1315
|
+
}
|
|
1316
|
+
t_56 += "</option>\n <option value=\"2\">";
|
|
1317
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1318
|
+
t_56 += "2";
|
|
1319
|
+
;
|
|
1320
|
+
}
|
|
1321
|
+
else {
|
|
1322
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue2"), env.opts.autoescape);
|
|
1323
|
+
;
|
|
1324
|
+
}
|
|
1325
|
+
t_56 += "</option>\n <option value=\"3\">";
|
|
1326
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1327
|
+
t_56 += "3";
|
|
1328
|
+
;
|
|
1329
|
+
}
|
|
1330
|
+
else {
|
|
1331
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue3"), env.opts.autoescape);
|
|
1332
|
+
;
|
|
1333
|
+
}
|
|
1334
|
+
t_56 += "</option>\n <option value=\"4\">";
|
|
1335
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1336
|
+
t_56 += "4";
|
|
1337
|
+
;
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue4"), env.opts.autoescape);
|
|
1341
|
+
;
|
|
1342
|
+
}
|
|
1343
|
+
t_56 += "</option>\n <option value=\"5\">";
|
|
1344
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1345
|
+
t_56 += "5";
|
|
1346
|
+
;
|
|
1347
|
+
}
|
|
1348
|
+
else {
|
|
1349
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue5"), env.opts.autoescape);
|
|
1350
|
+
;
|
|
1351
|
+
}
|
|
1352
|
+
t_56 += "</option>\n <option value=\"6\">";
|
|
1353
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1354
|
+
t_56 += "6";
|
|
1355
|
+
;
|
|
1356
|
+
}
|
|
1357
|
+
else {
|
|
1358
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue6"), env.opts.autoescape);
|
|
1359
|
+
;
|
|
1360
|
+
}
|
|
1361
|
+
t_56 += "</option>\n <option value=\"7\">";
|
|
1362
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1363
|
+
t_56 += "7";
|
|
1364
|
+
;
|
|
1365
|
+
}
|
|
1366
|
+
else {
|
|
1367
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue7"), env.opts.autoescape);
|
|
1368
|
+
;
|
|
1369
|
+
}
|
|
1370
|
+
t_56 += "</option>\n <option value=\"8\">";
|
|
1371
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1372
|
+
t_56 += "8";
|
|
1373
|
+
;
|
|
1374
|
+
}
|
|
1375
|
+
else {
|
|
1376
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue8"), env.opts.autoescape);
|
|
1377
|
+
;
|
|
1378
|
+
}
|
|
1379
|
+
t_56 += "</option>\n <option value=\"9\">";
|
|
1380
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1381
|
+
t_56 += "9";
|
|
1382
|
+
;
|
|
1383
|
+
}
|
|
1384
|
+
else {
|
|
1385
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue9"), env.opts.autoescape);
|
|
1386
|
+
;
|
|
1387
|
+
}
|
|
1388
|
+
t_56 += "</option>\n <option value=\"10\">";
|
|
1389
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1390
|
+
t_56 += "10";
|
|
1391
|
+
;
|
|
1392
|
+
}
|
|
1393
|
+
else {
|
|
1394
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue10"), env.opts.autoescape);
|
|
1395
|
+
;
|
|
1396
|
+
}
|
|
1397
|
+
t_56 += "</option>\n <option value=\"11\">";
|
|
1398
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1399
|
+
t_56 += "11";
|
|
1400
|
+
;
|
|
1401
|
+
}
|
|
1402
|
+
else {
|
|
1403
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue11"), env.opts.autoescape);
|
|
1404
|
+
;
|
|
1405
|
+
}
|
|
1406
|
+
t_56 += "</option>\n <option value=\"12\">";
|
|
1407
|
+
if(runtime.contextOrFrameLookup(context, frame, "variant") == "mobile") {
|
|
1408
|
+
t_56 += "12";
|
|
1409
|
+
;
|
|
1410
|
+
}
|
|
1411
|
+
else {
|
|
1412
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "monthValue12"), env.opts.autoescape);
|
|
1413
|
+
;
|
|
1414
|
+
}
|
|
1415
|
+
t_56 += "</option>\n </select>\n </div>\n <div class=\"govcy-d-block govcy-mr-3\">\n <label class=\"govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2\" for=\"";
|
|
1416
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1417
|
+
t_56 += "_year\">";
|
|
1418
|
+
t_56 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "yearLabel"), env.opts.autoescape);
|
|
1419
|
+
t_56 += "</label>\n <input id=\"";
|
|
1420
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"id"), env.opts.autoescape);
|
|
1421
|
+
t_56 += "_year\" name=\"";
|
|
1422
|
+
t_56 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
1423
|
+
t_56 += "_year\" class=\"govcy-text-input govcy-text-input-char_6";
|
|
1424
|
+
if(runtime.memberLookup((l_params),"hasYearError")) {
|
|
1425
|
+
t_56 += " govcy-text-input-error";
|
|
1426
|
+
;
|
|
1427
|
+
}
|
|
1428
|
+
t_56 += "\" maxlength=\"4\" type=\"text\" pattern=\"[0-9]*\" inputmode=\"numeric\"";
|
|
1429
|
+
if(runtime.memberLookup((l_params),"isBirthday")) {
|
|
1430
|
+
t_56 += " autocomplete=\"bday-year\"";
|
|
1431
|
+
;
|
|
1432
|
+
}
|
|
1433
|
+
t_56 += ">\n </div>\n </div>\n ";
|
|
1434
|
+
;
|
|
1435
|
+
frame = frame.pop();
|
|
1436
|
+
return new runtime.SafeString(t_56);
|
|
1437
|
+
});
|
|
1438
|
+
return macro_t_55;})()})])), env.opts.autoescape);
|
|
1439
|
+
t_52 += "\n ";
|
|
1440
|
+
;
|
|
1441
|
+
frame = frame.pop();
|
|
1442
|
+
return new runtime.SafeString(t_52);
|
|
1443
|
+
});
|
|
1444
|
+
return macro_t_51;})()})])), env.opts.autoescape);
|
|
1445
|
+
})})})})})})})})})})})});
|
|
1446
|
+
}
|
|
1447
|
+
;
|
|
1448
|
+
frame = callerFrame;
|
|
1449
|
+
return new runtime.SafeString(t_2);
|
|
1450
|
+
});
|
|
1451
|
+
context.addExport("dateInput");
|
|
1452
|
+
context.setVariable("dateInput", macro_t_1);
|
|
1453
|
+
if(parentTemplate) {
|
|
1454
|
+
parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);
|
|
1455
|
+
} else {
|
|
1456
|
+
cb(null, output);
|
|
1457
|
+
}
|
|
1458
|
+
;
|
|
1459
|
+
} catch (e) {
|
|
1460
|
+
cb(runtime.handleError(e, lineno, colno));
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
return {
|
|
1464
|
+
root: root
|
|
1465
|
+
};
|
|
1466
|
+
|
|
1467
|
+
})();
|
|
1468
|
+
})();
|
|
1469
|
+
|
|
895
1470
|
(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["elements/datePicker.njk"] = (function() {
|
|
896
1471
|
function root(env, context, frame, runtime, cb) {
|
|
897
1472
|
var lineno = 0;
|
|
@@ -5358,7 +5933,7 @@ var output = "";
|
|
|
5358
5933
|
try {
|
|
5359
5934
|
var parentTemplate = null;
|
|
5360
5935
|
var t_1;
|
|
5361
|
-
t_1 = ["label","legend","hint","button","errorMessage","select","textElement","htmlElement","textInput","radios","checkboxes","fileInput","fileView","backLink","tag","table","summaryList","textArea","markdown","panel","datePicker"];
|
|
5936
|
+
t_1 = ["label","legend","hint","button","errorMessage","select","textElement","htmlElement","textInput","radios","checkboxes","fileInput","fileView","backLink","tag","table","summaryList","textArea","markdown","panel","datePicker","dateInput"];
|
|
5362
5937
|
frame.set("macroSimpleBlocks", t_1, true);
|
|
5363
5938
|
if(frame.topLevel) {
|
|
5364
5939
|
context.setVariable("macroSimpleBlocks", t_1);
|
package/package.json
CHANGED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
|
|
2
|
+
{# dateInput
|
|
3
|
+
@param {object} legend The label text. Will escape text. Example `{en:"Content",el:"Περιεχομένο"}`
|
|
4
|
+
@param {string} id The id of the dateInput parts. For example `id_day`, `id_month` and `id_year`. Will escape text.
|
|
5
|
+
@param {string} name The name of the dateInput parts. For example `name_day`, `name_month` and `name_year` . Will escape text.
|
|
6
|
+
@param {object} hint The hint text. Optional. Will escape text. Example `{en:"Content",el:"Περιεχομένο"}`
|
|
7
|
+
@param {boolean} isPageHeading Is the label also the page heading? Optional, default is false. Can be true,false
|
|
8
|
+
@param {string} classes Additional classes to add to the outer `govcy-form-control` container. Optional
|
|
9
|
+
@param {object} error If not empty there is an error message and displays the error variant. Optional, default is ''. Will escape text. Example `{en:"Content",el:"Περιεχομένο"}`
|
|
10
|
+
@param {boolean} hideFormControlError If true, hides the form control error (red line on the left). Mostly used in conditional radio elements. Optional
|
|
11
|
+
@param {string} variant The variant. Can be 'desktop','mobile', default is mobile. Optional.
|
|
12
|
+
@param {boolean} isBirthday Is it a birthday?. Optional.
|
|
13
|
+
@param {boolean} hasDayError Does the day have an error?. Optional.
|
|
14
|
+
@param {boolean} hasMonthError Does the month have an error?. Optional.
|
|
15
|
+
@param {boolean} hasYearError Does the year have an error?. Optional.
|
|
16
|
+
@param {string} lang The language used. Can be 'en','el'. Optional.
|
|
17
|
+
@returns govcy dateInput html
|
|
18
|
+
#}
|
|
19
|
+
{% macro dateInput(params) -%}
|
|
20
|
+
{#- set default values -#}
|
|
21
|
+
{%- set isPageHeading = params.isPageHeading | default(false) -%}
|
|
22
|
+
{%- set variant = params.variant | default("mobile") -%}
|
|
23
|
+
{#- legend, id and name are mandatory -#}
|
|
24
|
+
{%- if params.legend and params.id and params.name -%}
|
|
25
|
+
{#- Import localizer from utilities -#}
|
|
26
|
+
{%- from "../utilities/govcyUtilities.njk" import govcyLocalizeContent, govcyLangAttribute -%}
|
|
27
|
+
{%- from "./fieldset.njk" import fieldset -%}
|
|
28
|
+
{%- from "./hint.njk" import hint -%}
|
|
29
|
+
{%- from "./legend.njk" import legend -%}
|
|
30
|
+
{%- from "./errorMessage.njk" import errorMessage -%}
|
|
31
|
+
{%- from "./formControl.njk" import formControl -%}
|
|
32
|
+
{#- set localizations -#}
|
|
33
|
+
{%- set dayLabel = govcyLocalizeContent({en:'Day',el:'Μέρα'} , params.lang) -%}
|
|
34
|
+
{%- set monthLabel = govcyLocalizeContent({en:'Month',el:'Μήνας'} , params.lang) -%}
|
|
35
|
+
{%- set yearLabel = govcyLocalizeContent({en:'Year',el:'Χρόνος'} , params.lang) -%}
|
|
36
|
+
{%- set monthValue1 = govcyLocalizeContent({en:'January',el:'Ιανουάριος'} , params.lang) -%}
|
|
37
|
+
{%- set monthValue2 = govcyLocalizeContent({en:'February',el:'Φεβρουάριος'} , params.lang) -%}
|
|
38
|
+
{%- set monthValue3 = govcyLocalizeContent({en:'March',el:'Μάρτιος'} , params.lang) -%}
|
|
39
|
+
{%- set monthValue4 = govcyLocalizeContent({en:'April',el:'Απρίλιος'} , params.lang) -%}
|
|
40
|
+
{%- set monthValue5 = govcyLocalizeContent({en:'May',el:'Μάϊος'} , params.lang) -%}
|
|
41
|
+
{%- set monthValue6 = govcyLocalizeContent({en:'June',el:'Ιούνιος'} , params.lang) -%}
|
|
42
|
+
{%- set monthValue7 = govcyLocalizeContent({en:'July',el:'Ιούλιος'} , params.lang) -%}
|
|
43
|
+
{%- set monthValue8 = govcyLocalizeContent({en:'August',el:'Αύγουστος'} , params.lang) -%}
|
|
44
|
+
{%- set monthValue9 = govcyLocalizeContent({en:'September',el:'Σεπτέμβριος'} , params.lang) -%}
|
|
45
|
+
{%- set monthValue10 = govcyLocalizeContent({en:'October',el:'Οκτώβριος'} , params.lang) -%}
|
|
46
|
+
{%- set monthValue11 = govcyLocalizeContent({en:'November',el:'Νοέμβριος'} , params.lang) -%}
|
|
47
|
+
{%- set monthValue12 = govcyLocalizeContent({en:'December',el:'Δεκέμβριος'} , params.lang) -%}
|
|
48
|
+
{#- set hint id -#}
|
|
49
|
+
{%- if params.hint -%}
|
|
50
|
+
{%- set hintId = [params.id, "-hint"] | join -%}
|
|
51
|
+
{%- else -%}
|
|
52
|
+
{%- set hintId = '' -%}
|
|
53
|
+
{%- endif -%}
|
|
54
|
+
{#- set error id -#}
|
|
55
|
+
{%- if params.error -%}
|
|
56
|
+
{%- set errorId = [params.id, "-error"] | join -%}
|
|
57
|
+
{%- else -%}
|
|
58
|
+
{%- set errorId = '' -%}
|
|
59
|
+
{%- endif -%}
|
|
60
|
+
{# set aria described by #}
|
|
61
|
+
{%- if params.error or params.hint -%}
|
|
62
|
+
{% set ariaDescribedBy = hintId ~ ' ' ~ errorId %}
|
|
63
|
+
{%- else -%}
|
|
64
|
+
{% set ariaDescribedBy = '' %}
|
|
65
|
+
{%- endif -%}
|
|
66
|
+
{% call fieldset({ariaDescribedby:ariaDescribedBy,classes:params.classes, ariaRole:"group",lang:params.lang}) %}
|
|
67
|
+
{% call legend({legend:params.legend, isPageHeading:isPageHeading,lang:params.lang}) %}{% endcall %}
|
|
68
|
+
{% call formControl({isError: false if params.hideFormControlError else params.error}) %}
|
|
69
|
+
{% call hint({hint:params.hint, id:hintId,lang:params.lang}) %}{% endcall %}
|
|
70
|
+
{#- render error message -#}
|
|
71
|
+
{% call errorMessage({message:params.error,id:errorId,lang:params.lang}) %}{% endcall %}
|
|
72
|
+
{#- render date inputs -#}
|
|
73
|
+
<div class="govcy-d-flex govcy-flex-wrap"{{ govcyLangAttribute(params.lang) }}>
|
|
74
|
+
<div class="govcy-d-block govcy-mr-3">
|
|
75
|
+
<label class="govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2" for="{{ params.id }}_day">{{ dayLabel }}</label>
|
|
76
|
+
<input id="{{ params.id }}_day" name="{{ params.name }}_day" class="govcy-text-input govcy-text-input-char_3{% if params.hasDayError %} govcy-text-input-error{% endif %}" maxlength="2" type="text" pattern="[0-9]*" inputmode="numeric"{% if params.isBirthday %} autocomplete="bday-day"{% endif %}>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="govcy-d-block govcy-mr-3">
|
|
79
|
+
<label class="govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2" for="{{ params.id }}_month">{{ monthLabel }}</label>
|
|
80
|
+
<select id="{{ params.id }}_month" name="{{ params.name }}_month" class="govcy-select{% if params.hasMonthError %} govcy-select-error{% endif %}"{% if params.isBirthday %} autocomplete="bday-month"{% endif %}>
|
|
81
|
+
<option value="" selected=""></option>
|
|
82
|
+
<option value="1">{% if variant=="mobile" %}1{% else %}{{ monthValue1 }}{% endif %}</option>
|
|
83
|
+
<option value="2">{% if variant=="mobile" %}2{% else %}{{ monthValue2 }}{% endif %}</option>
|
|
84
|
+
<option value="3">{% if variant=="mobile" %}3{% else %}{{ monthValue3 }}{% endif %}</option>
|
|
85
|
+
<option value="4">{% if variant=="mobile" %}4{% else %}{{ monthValue4 }}{% endif %}</option>
|
|
86
|
+
<option value="5">{% if variant=="mobile" %}5{% else %}{{ monthValue5 }}{% endif %}</option>
|
|
87
|
+
<option value="6">{% if variant=="mobile" %}6{% else %}{{ monthValue6 }}{% endif %}</option>
|
|
88
|
+
<option value="7">{% if variant=="mobile" %}7{% else %}{{ monthValue7 }}{% endif %}</option>
|
|
89
|
+
<option value="8">{% if variant=="mobile" %}8{% else %}{{ monthValue8 }}{% endif %}</option>
|
|
90
|
+
<option value="9">{% if variant=="mobile" %}9{% else %}{{ monthValue9 }}{% endif %}</option>
|
|
91
|
+
<option value="10">{% if variant=="mobile" %}10{% else %}{{ monthValue10 }}{% endif %}</option>
|
|
92
|
+
<option value="11">{% if variant=="mobile" %}11{% else %}{{ monthValue11 }}{% endif %}</option>
|
|
93
|
+
<option value="12">{% if variant=="mobile" %}12{% else %}{{ monthValue12 }}{% endif %}</option>
|
|
94
|
+
</select>
|
|
95
|
+
</div>
|
|
96
|
+
<div class="govcy-d-block govcy-mr-3">
|
|
97
|
+
<label class="govcy-label govcy-mb-1 govcy-fw-normal govcy-mb-2" for="{{ params.id }}_year">{{ yearLabel }}</label>
|
|
98
|
+
<input id="{{ params.id }}_year" name="{{ params.name }}_year" class="govcy-text-input govcy-text-input-char_6{% if params.hasYearError %} govcy-text-input-error{% endif %}" maxlength="4" type="text" pattern="[0-9]*" inputmode="numeric"{% if params.isBirthday %} autocomplete="bday-year"{% endif %}>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
{% endcall %}
|
|
102
|
+
{% endcall %}
|
|
103
|
+
{%- endif -%}
|
|
104
|
+
{%- endmacro %}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@param {string} id The hint id. Will escape text. Optional
|
|
3
3
|
@param {string} classes Additional classes to add to the outer div. Optional
|
|
4
4
|
@param {string} ariaDescribedby Ids of aria-describedby. To be used for hints and errors. Optional
|
|
5
|
+
@param {string} ariaRole The ARIA role attribute. Optional.
|
|
5
6
|
@param {string} lang The language used. Can be 'en','el'. Optional.
|
|
6
7
|
@param {array} elements If defined will be rendered elements inside the form.
|
|
7
8
|
i.e. `[
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
{% macro fieldset(params) -%}
|
|
14
15
|
{#- Import localizer from utilities -#}
|
|
15
16
|
{%- from "../utilities/govcyUtilities.njk" import govcyLocalizeContent, govcyLangAttribute -%}
|
|
16
|
-
<fieldset {% if params.id %}id="{{ params.id }}" {% endif %}class="govcy-fieldset{% if params.classes %} {{ params.classes }}{% endif %}"{% if params.ariaDescribedby %} aria-describedby="{{ params.ariaDescribedby }}"{% endif %}{{ govcyLangAttribute(params.lang) }}>
|
|
17
|
+
<fieldset {% if params.id %}id="{{ params.id }}" {% endif %}class="govcy-fieldset{% if params.classes %} {{ params.classes }}{% endif %}"{% if params.ariaRole %} role="{{ params.ariaRole }}"{% endif %}{% if params.ariaDescribedby %} aria-describedby="{{ params.ariaDescribedby }}"{% endif %}{{ govcyLangAttribute(params.lang) }}>
|
|
17
18
|
{{ caller() }}
|
|
18
19
|
{#- if it has elements to be called -#}
|
|
19
20
|
{%- if params.elements -%}
|
package/src/njk/govcyElement.njk
CHANGED
|
@@ -25,7 +25,7 @@ To use:
|
|
|
25
25
|
{%- set macroSimpleBlocks = ['label', 'legend', 'hint', 'button',
|
|
26
26
|
'errorMessage','select','textElement','htmlElement','textInput','radios','checkboxes',
|
|
27
27
|
'fileInput','fileView','backLink','tag','table', 'summaryList', 'textArea','markdown',
|
|
28
|
-
'panel', 'datePicker'] -%}
|
|
28
|
+
'panel', 'datePicker','dateInput'] -%}
|
|
29
29
|
{%- set macroCallerBlocks = ['formControl','form','fieldset'] -%}
|
|
30
30
|
{%- macro govcyElement(component, params) -%}
|
|
31
31
|
{#- Simple blocks -#}
|