--- /dev/null
+[% WRAPPER base.tt2 %]
+[% ctx.page_title = l('Address Alert') %]
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
+ <div>[% l('Address Alert') %]</div>
+ <div>
+ <button dojoType='dijit.form.Button' onClick='addrAlertGrid.showCreateDialog()'>[% l('New Address Alert') %]</button>
+ <button dojoType='dijit.form.Button' onClick='addrAlertGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
+ </div>
+ </div>
+ <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <span>[% l('Context Org Unit') %]</span>
+ <select dojoType="openils.widget.OrgUnitFilteringSelect"
+ jsId='contextOrgSelector'
+ searchAttr='shortname'
+ labelAttr='shortname'>
+ </select>
+ </div>
+ <div>
+ <p>
+ [% |l %]* Address Alert fields support regular expressions and are case-insensitive by default.[% END %]<br/>
+ <span class='pad-level-1'>[% |l %]* Example wildcard match: 742 Evergr.*n Terrace[% END %]</span><br/>
+ <span class='pad-level-1'>[% |l %]* Example case-sensitive match: (?c)742 Evergr.*n Terrace[% END %]</span><br/>
+ [% |l %]* If the billing or mailing address fields are selected, the tested address must be a billing or mailing address to match.[% END %]<br/>
+ </p>
+ </div>
+ <table jsId="addrAlertGrid"
+ dojoType="openils.widget.AutoGrid"
+ fieldOrder="['owner', 'active', 'match_all', 'alert_message', 'street1', 'street2', 'city', 'county', 'state', 'country', 'post_code']"
+ query="{field: '*'}"
+ fmClass='aal'
+ autoHeight='true'
+ editOnEnter='true'>
+ </table>
+</div>
+
+<script type="text/javascript">
+ dojo.require('openils.Util');
+ dojo.require('openils.User');
+ dojo.require('openils.widget.AutoGrid');
+ dojo.require('openils.widget.OrgUnitFilteringSelect');
+
+ function loadGrid() {
+ var org = contextOrgSelector.attr('value');
+ addrAlertGrid.resetStore();
+ addrAlertGrid.loadAll({}, {owner : org});
+ }
+
+ openils.Util.addOnLoad(
+ function() {
+ new openils.User().buildPermOrgSelector('ADMIN_ADDRESS_ALERT', contextOrgSelector, null,
+ function() {
+ dojo.connect(contextOrgSelector, 'onChange', loadGrid);
+ loadGrid();
+ }
+ );
+ }
+ );
+</script>
+[% END %]
+
+
<!ENTITY staff.main.menu.admin.local_admin.copy_template.accesskey "T">
<!ENTITY staff.main.menu.admin.local_admin.patrons_due_refunds.label "Patrons with Negative Balances">
<!ENTITY staff.main.menu.admin.local_admin.patrons_due_refunds.accesskey "N">
+<!ENTITY staff.main.menu.admin.local_admin.address_alert.label "Address Alerts">
<!ENTITY staff.main.menu.admin.server_admin.label "Server Administration">
<!ENTITY staff.main.menu.admin.server_admin.conify.org_unit_type.label "Organization Types">
['oncommand'],
function(event) { open_eg_web_page('conify/global/booking/resource_attr_map', null, event); }
],
+ 'cmd_local_admin_address_alert' : [
+ ['oncommand'],
+ function(event) { open_eg_web_page('conify/global/actor/address_alert', null, event); }
+ ],
'cmd_acq_create_invoice' : [
['oncommand'],
function(event) { open_eg_web_page('acq/invoice/view?create=1', 'menu.cmd_acq_create_invoice.tab', event); }
<command id="cmd_local_admin_work_log" />
<command id="cmd_local_admin_patrons_due_refunds" />
<command id="cmd_local_admin_copy_template" />
+ <command id="cmd_local_admin_address_alert"
+ perm="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT"
+ />
<!-- server admin menu commands -->
<command id="cmd_server_admin_org_type"
<menuitem label="&staff.main.menu.admin.local_admin.conify.survey.label;" command="cmd_local_admin_survey"/>
<menuitem label="&staff.server.admin.index.transit_list;" command="cmd_local_admin_transit_list"/>
<menuitem label="&staff.main.menu.admin.local_admin.work_log.label;" accesskey="&staff.main.menu.admin.local_admin.work_log.accesskey;" command="cmd_local_admin_work_log"/>
+ <menuitem label="&staff.main.menu.admin.local_admin.address_alert.label;" command="cmd_local_admin_address_alert"/>
</menupopup>
</menu>
<menu id="main.menu.admin.server" label="&staff.main.menu.admin.server_admin.label;">