null,
'bool' ),
+( 'ui.circ.standing_penalty.require_initials',
+ 'Require staff initials for entry/edit of standing penalties.',
+ null,
+ 'bool' ),
+
( 'ui.general.button_bar',
'Button bar',
null,
<!ENTITY staff.patron_display.apply_penalty_dialog.cancel_btn.accesskey "C">
<!ENTITY staff.patron_display.apply_penalty_dialog.apply_btn.label "Apply">
<!ENTITY staff.patron_display.apply_penalty_dialog.apply_btn.accesskey "A">
+<!ENTITY staff.patron_display.apply_penalty_dialog.initials_entry.label "Initials">
+<!ENTITY staff.patron_display.apply_penalty_dialog.initials_entry.accesskey "I">
<!ENTITY staff.patron_display.edit_penalty_dialog.title "Modify Standing Penalty/Message">
<!ENTITY staff.patron_display.edit_penalty_dialog.header "Modify Standing Penalty/Message">
<!ENTITY staff.patron_display.edit_penalty_dialog.description "Notes, Alerts, Blocks">
<!ENTITY staff.patron_display.edit_penalty_dialog.cancel_btn.accesskey "C">
<!ENTITY staff.patron_display.edit_penalty_dialog.apply_btn.label "Modify">
<!ENTITY staff.patron_display.edit_penalty_dialog.apply_btn.accesskey "M">
+<!ENTITY staff.patron_display.edit_penalty_dialog.initials_entry.label "Initials">
+<!ENTITY staff.patron_display.edit_penalty_dialog.initials_entry.accesskey "I">
<!ENTITY staff.patron_editor_interface_label "Patron Edit">
<!ENTITY staff.patron_interface_label "Patron ">
<!ENTITY staff.patron_navbar.bills 'Bills'>
build_penalty_menu();
+ var show_initials = String( data.hash.aous['ui.circ.standing_penalty.require_initials'] ) == 'true';
+ if (show_initials) {
+ document.getElementById('initials_box').hidden = false;
+ }
+
/* set widget values */
document.getElementById('csp_menupopup').setAttribute('value',xul_param('id',{'modal_xulG':true}));
if (xul_param('id',{'modal_xulG':true})==21) { // SILENT_NOTE
document.getElementById('apply_btn').addEventListener(
'command',
function() {
+ var note = document.getElementById('note_tb').value;
+ if (!document.getElementById('initials_box').hidden) {
+ var initials_tb = document.getElementById('initials_tb');
+ if (initials_tb.value == '') {
+ initials_tb.focus(); return;
+ } else {
+ note = note + ' - ' + initials_tb.value;
+ }
+ }
update_modal_xulG(
{
'id' : document.getElementById('csp_menupopup').getAttribute('value'),
- 'note' : document.getElementById('note_tb').value,
+ 'note' : note,
'modify' : 1
}
)
</toolbox>
<textbox id="note_tb" multiline="true" />
<hbox>
+ <hbox id="initials_box">
+ <label control="initials_tb"
+ value="&staff.patron_display.edit_penalty_dialog.initials_entry.label;"
+ accesskey="&staff.patron_display.edit_penalty_dialog.initials_entry.accesskey;"/>
+ <textbox id="initials_tb" />
+ </hbox>
<spacer flex="1"/>
<button id="cancel_btn" label="&staff.patron_display.edit_penalty_dialog.cancel_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.cancel_btn.accesskey;" />
- <button id="apply_btn" label="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" />
+ <button id="apply_btn" label="&staff.patron_display.edit_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.edit_penalty_dialog.apply_btn.accesskey;" />
</hbox>
</window>
build_penalty_menu();
+ var show_initials = String( data.hash.aous['ui.circ.standing_penalty.require_initials'] ) == 'true';
+ if (show_initials) {
+ document.getElementById('initials_box').hidden = false;
+ }
+
/* set widget behavior */
document.getElementById('csp_menulist').addEventListener(
'command',
document.getElementById('apply_btn').addEventListener(
'command',
function() {
+ var note = document.getElementById('note_tb').value;
+ if (!document.getElementById('initials_box').hidden) {
+ var initials_tb = document.getElementById('initials_tb');
+ if (initials_tb.value == '') {
+ initials_tb.focus(); return;
+ } else {
+ note = note + ' - ' + initials_tb.value;
+ }
+ }
update_modal_xulG(
{
'id' : document.getElementById('csp_menupopup').getAttribute('value'),
- 'note' : document.getElementById('note_tb').value,
+ 'note' : note,
'modify' : 1
}
)
</toolbox>
<textbox id="note_tb" multiline="true" />
<hbox>
+ <hbox id="initials_box">
+ <label control="initials_tb"
+ value="&staff.patron_display.apply_penalty_dialog.initials_entry.label;"
+ accesskey="&staff.patron_display.apply_penalty_dialog.initials_entry.accesskey;"/>
+ <textbox id="initials_tb" />
+ </hbox>
<spacer flex="1"/>
<button id="cancel_btn" label="&staff.patron_display.apply_penalty_dialog.cancel_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.cancel_btn.accesskey;" />
- <button id="apply_btn" label="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" />
+ <button id="apply_btn" label="&staff.patron_display.apply_penalty_dialog.apply_btn.label;" accesskey="&staff.patron_display.apply_penalty_dialog.apply_btn.accesskey;" />
</hbox>
</window>