Bug 17011 - Remove "onblur" event attribute from some templates
Several templates have an "onblur" event attribute in the markup. This
patch moves the onblur event definition into the JavaScript.
To test, apply the patch and clear your browser cache if necessary.
In Administration -> Authority types:
- Choose "New authority type."
- Enter any text into the "Authority type" field.
- Moving the cursor focus away from this field should convert your
text to uppercase.
In Administration -> MARC bibliographic framework:
- Choose "New framework."
- Enter any text into the "Framework code" field.
- Moving the cursor focus away from this field should convert your
text to uppercase.
In Administration -> Currencies and exchange rates:
- Choose "New currency."
- Enter any text into the "Currency" field.
- Moving the cursor focus away from this field should convert your
text to uppercase.
In Administration -> Item types
- Choose "New item type."
- Enter any text into the "Item type" field.
- Moving the cursor focus away from this field should convert your
text to uppercase.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
4e52b81247
commit
7293d81290
|
|
@ -18,6 +18,9 @@
|
|||
],
|
||||
"sPaginationType": "four_button"
|
||||
}));
|
||||
$("#authtypecode").on("blur",function(){
|
||||
toUC(this);
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -85,7 +88,7 @@
|
|||
<input type="hidden" name="authtypecode" value="[% authority_type.authtypecode %]" />[% authority_type.authtypecode %]
|
||||
[% ELSE %]
|
||||
<label for="authtypecode" class="required">Authority type: </label>
|
||||
<input id="authtypecode" type="text" class="required" required="required" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" />
|
||||
<input id="authtypecode" type="text" class="required" required="required" name="authtypecode" size="10" maxlength="10" />
|
||||
<span class="required">Required</span>
|
||||
[% END %]
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
[% ELSE %]
|
||||
<li>
|
||||
<label for="frameworkcode" class="required">Framework code: </label>
|
||||
<input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" required="required" class="required" />
|
||||
<input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" required="required" class="required" />
|
||||
<span class="required">Required</span>
|
||||
</li>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@
|
|||
check_currency( $(this).val() );
|
||||
});
|
||||
check_currency( $("#rate").val() );
|
||||
$("#currency_code").on("blur",function(){
|
||||
toUC(this);
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -108,7 +111,7 @@
|
|||
<input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %]
|
||||
[% ELSE %]
|
||||
<label for="currency_code" class="required">Currency: </label>
|
||||
<input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" onblur="toUC(this);" required="required" class="required" /> <span class="required">Required</span>
|
||||
<input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span>
|
||||
[% END %]
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ Data deleted
|
|||
rentalcharge: { number: true }
|
||||
}
|
||||
});
|
||||
$("#itemtype").on("blur",function(){
|
||||
toUC(this);
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -134,7 +137,7 @@ Item types administration
|
|||
[% ELSE %]
|
||||
<li>
|
||||
<label for="itemtype" class="required">Item type: </label>
|
||||
<input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" required="required" /> <span class="required">Required</span>
|
||||
<input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" /> <span class="required">Required</span>
|
||||
</li>
|
||||
[% END %]
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -73,4 +73,7 @@
|
|||
obj.css("background-color","white");
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$("#frameworkcode").on("blur",function(){
|
||||
toUC(this);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue