1/ It now works with neworderempty.pl
2/ The set_to_today function was moved from
additem.tt to dateaccessioned.pl (so it's
available to all pages using the plugin)
Signed-off-by: Julien Sicot <julien.sicot@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
my $today_iso = C4::Dates->today('iso');
my $today_iso = C4::Dates->today('iso');
-$template->param(today_iso => $today_iso);
-
my $tagslib = &GetMarcStructure(1,$frameworkcode);
my $record = GetMarcBiblio($biblionumber);
my $oldrecord = TransformMarcToKoha($dbh,$record);
my $tagslib = &GetMarcStructure(1,$frameworkcode);
my $record = GetMarcBiblio($biblionumber);
my $oldrecord = TransformMarcToKoha($dbh,$record);
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
use strict;
-#use warnings; FIXME - Bug 2505
// summary += i + ": " + document.f.tag[i].value + " " + document.f.subfield[i].value + ": " + document.f.field_value[i].value + "\\n";
//}
//alert("Got focus, subfieldmanaged: " + subfield_managed + "\\n" + summary);
// summary += i + ": " + document.f.tag[i].value + " " + document.f.subfield[i].value + ": " + document.f.field_value[i].value + "\\n";
//}
//alert("Got focus, subfieldmanaged: " + subfield_managed + "\\n" + summary);
- set_to_today(id); // defined in additem.pl HEAD
return 0;
}
function Clic$function_name(id) {
return 0;
}
function Clic$function_name(id) {
- set_to_today(id, 1); // defined in additem.pl HEAD
+
+function set_to_today(id, force) {
+ if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; }
+ if (\$("#" + id).val() == '' || \$("#" + id).val() == '0000-00-00' || force) {
+ \$("#" + id).val("$date");
+ }
+}
//]]>
</script>
END_OF_JS
//]]>
</script>
END_OF_JS
function () {$(this).attr("class","" );}
);
});
function () {$(this).attr("class","" );}
);
});
-
-function set_to_today(id, force) {
- if (! id) { alert(_("Bad id ") + id + _(" sent to set_to_today()")); return 0; }
- if ($("#" + id).val() == '' || $("#" + id).val() == '0000-00-00' || force) {
- $("#" + id).val("[% today_iso %]");
- }
-}
//]]>
</script>
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />
//]]>
</script>
<link type="text/css" rel="stylesheet" href="[% themelang %]/css/addbiblio.css" />