@gov-cy/govcy-frontend-renderer 1.19.0 → 1.20.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.
|
@@ -2588,7 +2588,16 @@ t_30 += " ";
|
|
|
2588
2588
|
t_30 += "\"";
|
|
2589
2589
|
;
|
|
2590
2590
|
}
|
|
2591
|
-
t_30 += ">\n
|
|
2591
|
+
t_30 += ">\n ";
|
|
2592
|
+
if(runtime.memberLookup((l_params),"name")) {
|
|
2593
|
+
t_30 += "<input type=\"hidden\" name=\"";
|
|
2594
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2595
|
+
t_30 += "Attachment[fileId]\" value=\"\">\n <input type=\"hidden\" name=\"";
|
|
2596
|
+
t_30 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2597
|
+
t_30 += "Attachment[sha256]\" value=\"\">";
|
|
2598
|
+
;
|
|
2599
|
+
}
|
|
2600
|
+
t_30 += "\n ";
|
|
2592
2601
|
;
|
|
2593
2602
|
frame = frame.pop();
|
|
2594
2603
|
return new runtime.SafeString(t_30);
|
|
@@ -2682,7 +2691,7 @@ context.setVariable("hint", t_16);
|
|
|
2682
2691
|
var t_17;
|
|
2683
2692
|
t_17 = (function() {
|
|
2684
2693
|
var output = "";
|
|
2685
|
-
output += runtime.suppressValue((lineno =
|
|
2694
|
+
output += runtime.suppressValue((lineno = 21, colno = 41, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_view",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2686
2695
|
;
|
|
2687
2696
|
return output;
|
|
2688
2697
|
})()
|
|
@@ -2697,7 +2706,7 @@ context.addExport("viewLabel", t_17);
|
|
|
2697
2706
|
var t_18;
|
|
2698
2707
|
t_18 = (function() {
|
|
2699
2708
|
var output = "";
|
|
2700
|
-
output += runtime.suppressValue((lineno =
|
|
2709
|
+
output += runtime.suppressValue((lineno = 22, colno = 43, runtime.callWrap(t_8, "govcyGetContent", context, ["fileView_delete",runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2701
2710
|
;
|
|
2702
2711
|
return output;
|
|
2703
2712
|
})()
|
|
@@ -2718,7 +2727,7 @@ t_2 += "-view-control\" ";
|
|
|
2718
2727
|
;
|
|
2719
2728
|
}
|
|
2720
2729
|
t_2 += "class=\"govcy-form\">\n ";
|
|
2721
|
-
t_2 += runtime.suppressValue((lineno =
|
|
2730
|
+
t_2 += runtime.suppressValue((lineno = 26, colno = 23, runtime.callWrap(t_12, "formControl", context, [{"classes": runtime.memberLookup((l_params),"classes"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_19 = runtime.makeMacro(
|
|
2722
2731
|
[],
|
|
2723
2732
|
[],
|
|
2724
2733
|
function (kwargs) {
|
|
@@ -2735,7 +2744,7 @@ else {
|
|
|
2735
2744
|
t_20 += "<p class=\"govcy-label govcy-label-primary\">";
|
|
2736
2745
|
;
|
|
2737
2746
|
}
|
|
2738
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2747
|
+
t_20 += runtime.suppressValue((lineno = 27, colno = 135, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"label"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2739
2748
|
if(runtime.memberLookup((l_params),"isPageHeading")) {
|
|
2740
2749
|
t_20 += "</h1>";
|
|
2741
2750
|
;
|
|
@@ -2744,7 +2753,7 @@ else {
|
|
|
2744
2753
|
t_20 += "</p>";
|
|
2745
2754
|
;
|
|
2746
2755
|
}
|
|
2747
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2756
|
+
t_20 += runtime.suppressValue((lineno = 29, colno = 20, runtime.callWrap(t_16, "hint", context, [{"hint": runtime.memberLookup((l_params),"hint"),"lang": runtime.memberLookup((l_params),"lang")},runtime.makeKeywordArgs({"caller": (function (){var macro_t_21 = runtime.makeMacro(
|
|
2748
2757
|
[],
|
|
2749
2758
|
[],
|
|
2750
2759
|
function (kwargs) {
|
|
@@ -2764,7 +2773,7 @@ t_20 += "\">";
|
|
|
2764
2773
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "viewLabel"), env.opts.autoescape);
|
|
2765
2774
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2766
2775
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2767
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2776
|
+
t_20 += runtime.suppressValue((lineno = 31, colno = 146, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2768
2777
|
t_20 += "</span>";
|
|
2769
2778
|
;
|
|
2770
2779
|
}
|
|
@@ -2775,11 +2784,24 @@ t_20 += "\">";
|
|
|
2775
2784
|
t_20 += runtime.suppressValue(runtime.contextOrFrameLookup(context, frame, "deleteLabel"), env.opts.autoescape);
|
|
2776
2785
|
if(runtime.memberLookup((l_params),"visuallyHiddenText")) {
|
|
2777
2786
|
t_20 += "<span class=\"govcy-visually-hidden\">";
|
|
2778
|
-
t_20 += runtime.suppressValue((lineno =
|
|
2787
|
+
t_20 += runtime.suppressValue((lineno = 33, colno = 169, runtime.callWrap(t_6, "govcyLocalizeContent", context, [runtime.memberLookup((l_params),"visuallyHiddenText"),runtime.memberLookup((l_params),"lang")])), env.opts.autoescape);
|
|
2779
2788
|
t_20 += "</span>";
|
|
2780
2789
|
;
|
|
2781
2790
|
}
|
|
2782
|
-
t_20 += "</a>\n
|
|
2791
|
+
t_20 += "</a>\n ";
|
|
2792
|
+
if(runtime.memberLookup((l_params),"name") && runtime.memberLookup((l_params),"fileId") && runtime.memberLookup((l_params),"sha256")) {
|
|
2793
|
+
t_20 += "<input type=\"hidden\" name=\"";
|
|
2794
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2795
|
+
t_20 += "Attachment[fileId]\" value=\"";
|
|
2796
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"fileId"), env.opts.autoescape);
|
|
2797
|
+
t_20 += "\">\n <input type=\"hidden\" name=\"";
|
|
2798
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"name"), env.opts.autoescape);
|
|
2799
|
+
t_20 += "Attachment[sha256]\" value=\"";
|
|
2800
|
+
t_20 += runtime.suppressValue(runtime.memberLookup((l_params),"sha256"), env.opts.autoescape);
|
|
2801
|
+
t_20 += "\">";
|
|
2802
|
+
;
|
|
2803
|
+
}
|
|
2804
|
+
t_20 += "\n ";
|
|
2783
2805
|
;
|
|
2784
2806
|
frame = frame.pop();
|
|
2785
2807
|
return new runtime.SafeString(t_20);
|
package/package.json
CHANGED
|
@@ -35,6 +35,10 @@
|
|
|
35
35
|
{% call errorMessage({message:params.error,id:errorId, lang:params.lang}) %}{% endcall %}
|
|
36
36
|
{#- render input -#}
|
|
37
37
|
<input id="{{params.id}}"{% if params.name %} name="{{ params.name }}"{% endif %} type="file" class="govcy-file-upload"{% if params.hint or params.error%} aria-describedby="{% if params.hint %}{{hintId}} {% endif %}{% if params.error %}{{errorId}} {% endif %}"{% endif %}>
|
|
38
|
+
{% if params.name -%}
|
|
39
|
+
<input type="hidden" name="{{ params.name }}Attachment[fileId]" value="">
|
|
40
|
+
<input type="hidden" name="{{ params.name }}Attachment[sha256]" value="">
|
|
41
|
+
{%- endif %}
|
|
38
42
|
{% endcall %}
|
|
39
43
|
{%- endif -%}
|
|
40
44
|
{%- endmacro %}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
@param {object} hint The hint text. Optional. Will escape text. `{en:"Content",el:"Περιεχομένο"}`
|
|
8
8
|
@param {string} classes Additional classes to add to the outer div. Optional
|
|
9
9
|
@param {boolean} isPageHeading Is the label also the page heading? Optional, default is false. Can be true,false
|
|
10
|
+
@param {string} name The input name. Will escape text. Optional
|
|
11
|
+
@param {string} fileId from upload response. Will escape text. Optional
|
|
12
|
+
@param {string} sha256 from upload response. Will escape text. Optional
|
|
10
13
|
@param {string} lang The language used. Can be 'en','el'. Optional.
|
|
11
14
|
@returns govcy file view and delete html
|
|
12
15
|
#}
|
|
@@ -29,6 +32,10 @@
|
|
|
29
32
|
<a href="{{ params.viewHref }}">{{viewLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
30
33
|
{#- render delete -#}
|
|
31
34
|
<a class="govcy-ml-3" href="{{ params.deleteHref }}">{{deleteLabel}}{%if params.visuallyHiddenText%}<span class="govcy-visually-hidden"> {{- govcyLocalizeContent(params.visuallyHiddenText, params.lang) -}}</span>{% endif %}</a>
|
|
35
|
+
{% if params.name -%}
|
|
36
|
+
<input type="hidden" name="{{ params.name }}Attachment[fileId]" value="{{ params.fileId }}">
|
|
37
|
+
<input type="hidden" name="{{ params.name }}Attachment[sha256]" value="{{ params.sha256 }}">
|
|
38
|
+
{%- endif %}
|
|
32
39
|
{% endcall %}
|
|
33
40
|
</div>
|
|
34
41
|
{%- endif -%}
|