PluginProbe
ANAC XML Bandi di Gara / 3
ANAC XML Bandi di Gara v3
7.8 trunk 0.1 1.0.0.1 1.0.1 1.0.2 1.0.3 1.0.4 1.1 1.1.1 1.1.2 2.0 2.0.1 2.0.2 2.0.3 2.1 2.2 2.3 2.3.1 3 3.0.1 3.1 3.1.1 3.1.2 3.1.3 All 57 releases
avcp / styledbackend.php

styledbackend.php in ANAC XML Bandi di Gara 3, at styledbackend.php

33 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 function sfondo_avcp_trasparenza() {
3 global $current_screen;
4 if ($current_screen->post_type == 'avcp') {
5 $css = '<style type="text/css">' . '#annirifdiv { background:yellow; } #error { border: 2px solid red; #right { border: 2px solid green;' . '</style>';
6 echo $css;
7 $javascript = '<script>
8 document.getElementById("avcp_data_inizio").setAttribute("readonly", "true");
9 document.getElementById("avcp_data_fine").setAttribute("readonly", "true");
10 document.getElementById("avcp_aggiudicazione").setAttribute("onkeyup", "valid(this)");
11 document.getElementById("avcp_aggiudicazione").setAttribute("onblur", "valid(this)");
12 document.getElementById("avcp_somme_liquidate").setAttribute("onkeyup", "valid(this)");
13 document.getElementById("avcp_somme_liquidate").setAttribute("onblur", "valid(this)");
14 document.getElementById("avcp_cig").setAttribute("onkeyup", "validcig(this)");
15 function valid(f) {
16 f.value = f.value.replace(/[^.0-9-\s]/ig,\'\');
17 $("#avcp_aggiudicazione").val.toFixed(2);
18 $("#avcp_somme_liquidate").val.toFixed(2);
19 }
20 function validcig(f) {
21 f.value = f.value.replace(/[^A-Z0-9-\s]/ig,\'\');
22 if(f.length != 10){
23 $("#avcp_cig").addClass("error");
24 } else {
25 $("#avcp_cig").addClass("valid");
26 }
27 }
28 </script>';
29 echo $javascript;
30 }
31 }
32 add_action('admin_footer', 'sfondo_avcp_trasparenza');
33 ?>