Merge branch 'bug_6209' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-03-23 00:13:15 -04:00
commit 6c4da573db
6 changed files with 48 additions and 10 deletions

File diff suppressed because one or more lines are too long

View file

@ -656,6 +656,12 @@ fieldset.rows label.yesno {
width : auto;
}
fieldset.rows label.error {
float: none;
margin-left: 1em;
width: auto;
}
fieldset.action, div.action {
background-color: transparent;
clear : both;
@ -1196,7 +1202,8 @@ div.note {
text-decoration : underline;
}
.required {
label.required,
span.required {
color : #C00;
}

View file

@ -15,6 +15,7 @@
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
<script type="text/javascript" src="[% interface %]/lib/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.validate.min.js"></script>
[% IF ( login ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/login.css" />
@ -36,6 +37,7 @@
<!-- koha core js -->
<script type="text/javascript" src="[% themelang %]/js/staff-global.js"></script>
[% INCLUDE 'validator-strings.inc' %]
[% IF ( intranetuserjs ) %]
<script type="text/javascript">
//<![CDATA[

View file

@ -0,0 +1,23 @@
<script type="text/javascript">
//<![CDATA[
$(document).ready(function(){
jQuery.extend(jQuery.validator.messages, {
required: _("This field is required."),
remote: _("Please fix this field."),
email: _("Please enter a valid email address."),
url: _("Please enter a valid URL."),
date: _("Please enter a valid date."),
dateISO: _("Please enter a valid date (ISO)."),
number: _("Please enter a valid number."),
digits: _("Please enter only digits."),
equalTo: _("Please enter the same value again."),
maxlength: $.validator.format(_("Please enter no more than {0} characters.")),
minlength: $.validator.format(_("Please enter at least {0} characters.")),
rangelength: $.validator.format(_("Please enter a value between {0} and {1} characters long.")),
range: $.validator.format(_("Please enter a value between {0} and {1}.")),
max: $.validator.format(_("Please enter a value less than or equal to {0}.")),
min: $.validator.format(_("Please enter a value greater than or equal to {0}."))
});
});
//]]>
</script>

View file

@ -10,9 +10,11 @@ function _(s) { return s; } // dummy function for gettext
if($("#header_search #circ_search").length > 0){ $(document).bind('keydown','Alt+u',function (){ $("#header_search").tabs("select","#circ_search"); $("#findborrower").focus(); }); } else { $(document).bind('keydown','Alt+u',function(){ location.href="/cgi-bin/koha/circ/circulation.pl"; }); }
if($("#header_search #catalog_search").length > 0){ $(document).bind('keydown','Alt+q',function (){ $("#header_search").tabs("select","#catalog_search"); $("#search-form").focus(); }); } else { $(document).bind('keydown','Alt+q',function(){ location.href="/cgi-bin/koha/catalogue/search.pl"; }); }
$(".focus").focus();
$(".validated").validate();
});
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
function checkEnter(e){ //e is event object passed from function invocation
var characterCode; // literal character code will be stored in this variable

View file

@ -81,7 +81,7 @@ tinyMCE.init({
[% IF ( add ) %]
[% IF ( ERROR1 ) %]<div class="dialog message">Library with that code already exists &mdash; Please enter a unique code</div>[% END %]
<h3>[% IF ( heading_branches_add_branch_p ) %]New library[% ELSE %]Modify library[% END %]</h3>
<form action="[% action %]" name="Aform" method="post">
<form action="[% action %]" id="Aform" name="Aform" class="validated" method="post">
<fieldset class="rows">
<input type="hidden" name="op" value="add_validate" />
[% IF ( heading_branches_add_branch_p ) %]
@ -91,17 +91,17 @@ tinyMCE.init({
[% END %]
<ol><li>
[% IF ( heading_branches_add_branch_p ) %]
<label for="branchcode">Library code</label>
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% branchcode |html %]" />
<label for="branchcode" class="required">Library code</label>
<input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% branchcode |html %]" class="required" required="required" /> <span class="required">Required</span>
[% ELSE %]
<label for="branchcode">Library code</label>
<label for="branchcode" class="required">Library code</label>
<input type="hidden" name="branchcode" value="[% branchcode |html %]" />
[% branchcode %]
[% END %]
</li>
<li>
<label for="branchname">Name</label>
<input type="text" name="branchname" id="branchname" size="80" value="[% branch_name |html %]" />&nbsp;
<label for="branchname" class="required">Name</label>
<input type="text" name="branchname" id="branchname" size="80" value="[% branch_name |html %]" class="required" required="required" /> <span class="required">Required</span>
</li>
</ol>
</fieldset>
@ -130,8 +130,8 @@ tinyMCE.init({
<li><label for="branchcountry">Country</label><input type="text" name="branchcountry" id="branchcountry" value="[% branchcountry |html %]" /></li>
<li><label for="branchphone">Phone</label><input type="text" name="branchphone" id="branchphone" value="[% branchphone |html %]" /></li>
<li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="[% branchfax |html %]" /></li>
<li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="[% branchemail |html %]" /></li>
<li><label for="branchurl">URL</label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" /></li>
<li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" class="email" value="[% branchemail |html %]" /></li>
<li><label for="branchurl">URL</label><input type="text" name="branchurl" id="branchurl" value="[% branchurl |html %]" class="url" /></li>
<li><label for="opac_info">OPAC info</label><textarea name="opac_info" id="opac_info">[% opac_info |html %]</textarea></li>
<li><label for="branchip">IP</label><input type="text" name="branchip" id="branchip" value="[% branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
<!--