install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0387'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0388'); -- phasefx
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
'bool'
);
+-- 0388.data.org-setting-ui.patron.editor_defaults.sql
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, fm_class ) VALUES (
+ 'ui.patron.default_ident_type',
+ oils_i18n_gettext(
+ 'ui.patron.default_ident_type',
+ 'GUI: Default Ident Type for Patron Registration',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'ui.patron.default_ident_type',
+ 'This is the default Ident Type for new users in the patron editor.',
+ 'coust',
+ 'description'),
+ 'link',
+ 'cit'
+);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+ 'ui.patron.default_country',
+ oils_i18n_gettext(
+ 'ui.patron.default_country',
+ 'GUI: Default Country for New Addresses in Patron Editor',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'ui.patron.default_country',
+ 'This is the default Country for new addresses in the patron editor.',
+ 'coust',
+ 'description'),
+ 'string'
+);
+
+
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0388'); -- phasefx
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, fm_class ) VALUES (
+ 'ui.patron.default_ident_type',
+ oils_i18n_gettext(
+ 'ui.patron.default_ident_type',
+ 'GUI: Default Ident Type for Patron Registration',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'ui.patron.default_ident_type',
+ 'This is the default Ident Type for new users in the patron editor.',
+ 'coust',
+ 'description'),
+ 'link',
+ 'cit'
+);
+
+INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) VALUES (
+ 'ui.patron.default_country',
+ oils_i18n_gettext(
+ 'ui.patron.default_country',
+ 'GUI: Default Country for New Addresses in Patron Editor',
+ 'coust',
+ 'label'),
+ oils_i18n_gettext(
+ 'ui.patron.default_country',
+ 'This is the default Country for new addresses in the patron editor.',
+ 'coust',
+ 'description'),
+ 'string'
+);
+
+COMMIT;
'global.juvenile_age_threshold',
'patron.password.use_phone',
'ui.patron.default_inet_access_level',
+ 'ui.patron.default_ident_type',
+ 'ui.patron.default_country',
'circ.holds.behind_desk_pickup_supported',
'circ.patron_edit.clone.copy_address'
]);
patron.card(card);
patron.cards([card]);
patron.net_access_level(orgSettings['ui.patron.default_inet_access_level'] || 1);
+ patron.ident_type(orgSettings['ui.patron.default_ident_type']);
patron.stat_cat_entries([]);
patron.survey_responses([]);
patron.addresses([]);
addr.id(w._addr);
addr.isnew(1);
addr.usr(patron.id());
+ addr.country(orgSettings['ui.patron.default_country']);
var t = patron.addresses();
if (!t) { t = []; }
t.push(addr);
if(id < 0 && row.getAttribute('fmfield') == 'valid')
widget.widget.attr('value', true);
+ // make new addresses use the org setting for default country
+ if(id < 0 && row.getAttribute('fmfield') == 'country')
+ widget.widget.attr('value',orgSettings['ui.patron.default_country']);
+
} else if(row.getAttribute('name') == 'uedit-addr-pending-row') {
// if it's a pending address, show the 'approve' button