Bugzilla – Attachment 11698 Details for
Bug 8637
Lack of control on mandatory in orderreveive.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
this patch is finalised
0001-MT-9956-Lack-of-control-on-mandatory-in-orderreveive.patch (text/plain), 1.90 KB, created by
Christophe Croullebois
on 2012-08-20 12:32:27 UTC
(
hide
)
Description:
this patch is finalised
Filename:
MIME Type:
Creator:
Christophe Croullebois
Created:
2012-08-20 12:32:27 UTC
Size:
1.90 KB
patch
obsolete
>From 9b2f186e8e4eab1ed19fbdd241e59be9ae625ece Mon Sep 17 00:00:00 2001 >From: Christophe Croullebois <christophe.croullebois@biblibre.com> >Date: Mon, 13 Aug 2012 17:09:30 +0200 >Subject: [PATCH 1/1] (MT #9956) Lack of control on mandatory in orderreveive.tt > >Just add a check in Jscript when the form is submited >--- > .../prog/en/modules/acqui/orderreceive.tt | 22 ++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 821dcd3..a7e6cba 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -8,6 +8,28 @@ > function Check(form) { > [% IF (AcqCreateItemReceiving) %] > // Remove last itemblock if it is not in items_list >+ var total_errors=0; >+ $("input[name='mandatory'],select[name='mandatory']").each(function(i){ >+ if($(this).val() == 1){ >+ var mandatory_field = $("input[name='field_value'],select[name='field_value']").eq(i); >+ if(mandatory_field.val() == ''){ >+ mandatory_field.css("background-color","#FFFFCC"); >+ total_errors++; >+ } >+ } >+ }); >+ >+ var alertString2; >+ if (total_errors==0) { >+ return true; >+ } else { >+ alertString2 = _("Form not submitted because of the following problem(s)"); >+ alertString2 += "\n------------------------------------------------------------------------------------\n"; >+ alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (highlighted)"); >+ alert(alertString2); >+ return false; >+ } >+ > var lastitemblock = $("#outeritemblock > div:last"); > var tobedeleted = true; > var listitems = $("#items_list tr"); >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8637
:
11599
|
11639
|
11673
|
11698
|
11699
|
11735
|
11745
|
11748
|
11755