</div>
[% END %]
+
+[%
+# draws a vanilla form input field for inputs that require no
+# special additions.
+MACRO draw_form_input(cls, field, path, type, required) BLOCK;
+ IF !type; type = 'text'; END;
+ base_obj = path ? 'patron.' _ path : 'patron';
+ model = base_obj _ '.' _ field;
+%]
+ <div class="col-md-3 reg-field-input">
+ <input
+ type="[% type %]"
+ class="form-control"
+ name="[% model %]"
+ ng-change="field_modified()"
+ ng-required="field_required('[% cls %]', '[% field %]')"
+ ng-blur="handle_field_changed([% base_obj %], '[% field %]')"
+ ng-pattern="field_pattern('[% cls %]', '[% field %]')"
+ ng-class="{'patron-reg-invalid-field' : field_is_invalid('[% model %]')}"
+ ng-model="[% model %]"/>
+ </div>
+[% END %]
+
+[% MACRO draw_example_text(cls, field) BLOCK;
+ set_str = "org_settings['ui.patron.edit." _ cls _ "." _ field _ ".example']";
+%]
+ <span ng-if="[% set_str %]">
+ [% l('Example: [_1]', '{{' _ set_str _ '}}') %]
+ </span>
+[% END %]
+
<!-- progress dialog displayed as we await all data to finish loading -->
<div class="row" ng-show="!page_data_loaded">
<div class="col-md-6 pad-vert">
ng-model="patron.card.barcode"
ng-class="{'patron-reg-invalid-field' : field_is_invalid('barcode')}"
ng-pattern="field_pattern('ac', 'barcode')"
- ng-required="true"
+ ng-required="field_required('ac', 'barcode')"
focus-me="focus_bc"
ng-change="field_modified()"
ng-disabled="disable_bc"
<input type="text"
name='usrname'
ng-class="{'patron-reg-invalid-field' : field_is_invalid('usrname')}"
- ng-required="true"
+ ng-required="field_required('au', 'usrname')"
focus-me="focus_usrname"
ng-change="field_modified()"
ng-pattern="field_pattern('au', 'usrname')"
<div class="row reg-field-row" ng-show="show_field('au.passwd')">
[% draw_field_label('au', 'passwd') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- name='passwd'
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('passwd')}"
- ng-pattern="field_pattern('au', 'passwd')"
- ng-required="true"
- ng-change="field_modified()"
- ng-blur="handle_field_changed(patron, 'passwd')"
- class="form-control"
- ng-model="patron.passwd"/>
- </div>
+ [% draw_form_input('au', 'passwd'); %]
<div class="col-md-6 patron-reg-example">
<button class="btn btn-default" ng-click="generate_password()">
[% l('Generate Password') %]</button>
<div class="row reg-field-row" ng-show="show_field('au.prefix')">
[% draw_field_label('au', 'prefix') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="text"
- ng-change="field_modified()"
- class="form-control"
- name="prefix"
- ng-blur="handle_field_changed(patron, 'prefix')"
- ng-pattern="field_pattern('au', 'prefix')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('prefix')}"
- ng-required="org_settings['ui.patron.edit.au.prefix.require']"
- ng-model="patron.prefix"/>
- </div>
+ [% draw_form_input('au', 'prefix'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.prefix.example']">
- [% l('Example: [_1]', "{{org_settings['ui.patron.edit.au.prefix.example']}}") %]
- </span>
+ [% draw_example_text('au', 'prefix') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.first_given_name')">
[% draw_field_label('au', 'first_given_name') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- name="first_given_name"
- ng-pattern="field_pattern('au', 'first_given_name')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('first_given_name')}"
- ng-blur="handle_field_changed(patron, 'first_given_name')"
- class="form-control" ng-model="patron.first_given_name"/>
- </div>
+ [% draw_form_input('au', 'first_given_name'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.first_given_name.example']">
- [% l('Example: [_1]', "{{org_settings['ui.patron.edit.au.first_given_name.example']}}") %]
- </span>
+ [% draw_example_text('au', 'first_given_name') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.second_given_name')">
[% draw_field_label('au', 'second_given_name') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="text"
- name="second_given_name"
- ng-change="field_modified()"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('second_given_name')}"
- ng-pattern="field_pattern('au', 'second_given_name')"
- class="form-control" ng-model="patron.second_given_name"/>
- </div>
+ [% draw_form_input('au', 'second_given_name'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.second_given_name.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.second_given_name.example']}}") %]
- </span>
+ [% draw_example_text('au', 'second_given_name') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.family_name')">
[% draw_field_label('au', 'family_name') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="text"
- name="family_name"
- ng-change="field_modified()"
- ng-pattern="field_pattern('au', 'family_name')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('family_name')}"
- ng-blur="handle_field_changed(patron, 'family_name')"
- class="form-control" ng-model="patron.family_name"/>
- </div>
+ [% draw_form_input('au', 'family_name'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.family_name.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.family_name.example']}}") %]
- </span>
+ [% draw_example_text('au', 'family_name') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.suffix')">
[% draw_field_label('au', 'suffix') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="text"
- name="suffix"
- ng-change="field_modified()"
- ng-blur="handle_field_changed(patron, 'suffix')"
- ng-pattern="field_pattern('au', 'suffix')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('suffix')}"
- class="form-control"
- ng-model="patron.suffix"/>
- </div>
+ [% draw_form_input('au', 'suffix'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.suffix.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.suffix.example']}}") %]
- </span>
+ [% draw_example_text('au', 'suffix') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.alias')">
[% draw_field_label('au', 'alias') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="text"
- name="alias"
- ng-change="field_modified()"
- ng-blur="handle_field_changed(patron, 'alias')"
- ng-pattern="field_pattern('au', 'alias')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('alias')}"
- class="form-control"
- ng-model="patron.alias"/>
- </div>
+ [% draw_form_input('au', 'alias'); %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.alias.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.alias.example']}}") %]
- </span>
+ [% draw_example_text('au', 'alias') %]
</div>
</div>
class="form-control" ng-model="patron.dob"/>
</div>
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.dob.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.dob.example']}}") %]
- </span>
+ [% draw_example_text('au', 'dob') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.juvenile')">
[% draw_field_label('au', 'juvenile') %]
- <div class="col-md-3 reg-field-input">
- <input type="checkbox"
- name="juvenile"
- ng-change="field_modified()"
- ng-pattern="field_pattern('au', 'juvenile')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('juvenile')}"
- ng-blur="handle_field_changed(patron, 'juvenile')"
- class="form-control" ng-model="patron.juvenile"/>
- </div>
+ [% draw_form_input('au', 'alias', '', 'checkbox'); %]
</div>
<!-- ident_type -->
<div class="row reg-field-row" ng-show="show_field('au.ident_value')">
[% draw_field_label('au', 'ident_value') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- name="ident_value"
- ng-blur="handle_field_changed(patron, 'ident_value')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('ident_value')}"
- ng-pattern="field_pattern('au', 'ident_value')"
- class="form-control"
- ng-model="patron.ident_value"/>
- </div>
+ [% draw_form_input('au', 'ident_value') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.ident_value.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.ident_value.example']}}") %]
- </span>
+ [% draw_example_text('au', 'ident_value') %]
</div>
</div>
<!-- IDENT_VALUE2 -->
<div class="row reg-field-row" ng-show="show_field('au.ident_value2')">
[% draw_field_label('au', 'ident_value2') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- name="ident_value2"
- ng-change="field_modified()"
- ng-pattern="field_pattern('au', 'ident_valued')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('ident_value2')}"
- ng-blur="handle_field_changed(patron, 'ident_value2')"
- class="form-control"
- ng-model="patron.ident_value2"/>
- </div>
+ [% draw_form_input('au', 'ident_value2') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.ident_value2.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.ident_value2.example']}}") %]
- </span>
+ [% draw_example_text('au', 'ident_value2') %]
</div>
</div>
<!-- EMAIL -->
<div class="row reg-field-row" ng-show="show_field('au.email')">
- [% draw_field_label('au', 'ident_value2') %]
- <div class="col-md-3 reg-field-input">
- <input type="email"
- name="email"
- ng-change="field_modified()"
- ng-pattern="field_pattern('au', 'email')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('email')}"
- ng-blur="handle_field_changed(patron, 'email')"
- class="form-control" ng-model="patron.email"/>
- </div>
+ [% draw_field_label('au', 'email') %]
+ [% draw_form_input('au', 'email', '', 'email') %]
<div class="col-md-6 patron-reg-example">
<button ng-show="patron.email && !patron.isnew"
class="btn btn-default"
<div class="row reg-field-row" ng-show="show_field('au.day_phone')">
[% draw_field_label('au', 'day_phone') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- name="day_phone"
- ng-blur="handle_field_changed(patron, 'day_phone')"
- ng-change="field_modified()"
- ng-pattern="field_pattern('au', 'day_phone')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('day_phone')}"
- class="form-control" ng-model="patron.day_phone"/>
- </div>
+ [% draw_form_input('au', 'day_phone') %]
<div class="col-md-6 patron-reg-example">
<button ng-show="patron.day_phone && !patron.isnew"
class="btn btn-default"
ng-click="invalidate_field('day_phone')">[% l('Invalidate') %]</button>
- <span ng-if="org_settings['ui.patron.edit.au.day_phone.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.day_phone.example']}}") %]
- </span>
+ [% draw_example_text('au', 'day_phone') %]
<!-- phones have a fall-through example strings -->
<span ng-if="!org_settings['ui.patron.edit.au.day_phone.example'] && org_settings['ui.patron.edit.phone.example']">
[% l('Example: [_1]',
<div class="row reg-field-row" ng-show="show_field('au.evening_phone')">
[% draw_field_label('au', 'evening_phone') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- name="evening_phone"
- ng-pattern="field_pattern('au', 'evening_phone')"
- ng-blur="handle_field_changed(patron, 'evening_phone')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('evening_phone')}"
- ng-change="field_modified()"
- class="form-control" ng-model="patron.evening_phone"/>
- </div>
+ [% draw_form_input('au', 'evening_phone') %]
<div class="col-md-6 patron-reg-example">
<button ng-show="patron.evening_phone && !patron.isnew"
class="btn btn-default"
ng-click="invalidate_field('evening_phone')">[% l('Invalidate') %]</button>
- <span ng-if="org_settings['ui.patron.edit.au.evening_phone.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.evening_phone.example']}}") %]
- </span>
+ [% draw_example_text('au', 'evening_phone') %]
<!-- phones have a fall-through example strings -->
<span ng-if="!org_settings['ui.patron.edit.au.evening_phone.example'] && org_settings['ui.patron.edit.phone.example']">
[% l('Example: [_1]',
<div class="row reg-field-row" ng-show="show_field('au.other_phone')">
[% draw_field_label('au', 'other_phone') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- name="other_phone"
- ng-blur="handle_field_changed(patron, 'other_phone')"
- ng-pattern="field_pattern('au', 'other_phone')"
- ng-class="{'patron-reg-invalid-field' : field_is_invalid('other_phone')}"
- ng-change="field_modified()"
- class="form-control" ng-model="patron.other_phone"/>
- </div>
+ [% draw_form_input('au', 'other_phone') %]
<div class="col-md-6 patron-reg-example">
<button ng-show="patron.other_phone && !patron.isnew"
class="btn btn-default"
ng-click="invalidate_field('other_phone')">[% l('Invalidate') %]</button>
- <span ng-if="org_settings['ui.patron.edit.au.other_phone.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.other_phone.example']}}") %]
- </span>
+ [% draw_example_text('au', 'other_phone') %]
<!-- phones have a fall-through example strings -->
<span ng-if="!org_settings['ui.patron.edit.au.other_phone.example'] && org_settings['ui.patron.edit.phone.example']">
[% l('Example: [_1]',
<div class="row reg-field-row" ng-show="show_field('au.active')">
[% draw_field_label('au', 'active') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <div class='checkbox'>
- <input type='checkbox'
- ng-blur="handle_field_changed(patron, 'active')"
- ng-model='patron.active'/>
- </div>
- </div>
+ [% draw_form_input('au', 'active', '', 'checkbox') %]
</div>
<!-- BARRED -->
<div class="row reg-field-row" ng-show="show_field('au.barred')">
[% draw_field_label('au', 'barred') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <div class='checkbox'>
- <input type='checkbox'
- ng-blur="handle_field_changed(patron, 'barred')"
- ng-model='patron.barred'/>
- </div>
- </div>
+ [% draw_form_input('au', 'barred', '', 'checkbox') %]
</div>
<!-- MASTER_ACCOUNT -->
<div class="row reg-field-row" ng-show="show_field('au.master_account')">
[% draw_field_label('au', 'master_account') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <div class='checkbox'>
- <input type='checkbox'
- ng-blur="handle_field_changed(patron, 'master_account')"
- ng-model='patron.master_account'/>
- </div>
- </div>
+ [% draw_form_input('au', 'master_account', '', 'checkbox') %]
</div>
<!-- CLAIMS_RETURNED_COUNT -->
<div class="row reg-field-row" ng-show="show_field('au.claims_returned_count')">
[% draw_field_label('au', 'claims_returned_count') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="number"
- ng-blur="handle_field_changed(patron, 'claims_returned_count')"
- ng-change="field_modified()"
- class="form-control" ng-model="patron.claims_returned_count"/>
- </div>
+ [% draw_form_input('au', 'claims_returned_count', '', 'number') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.claims_returned_count.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.claims_returned_count.example']}}") %]
- </span>
+ [% draw_example_text('au', 'claims_returned_count') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('au.claims_never_checked_out_count')">
[% draw_field_label('au', 'claims_never_checked_out_count') %]
- <div class="col-md-3 reg-field-input"> <!-- field form input -->
- <input type="number"
- ng-blur="handle_field_changed(patron, 'claims_never_checked_out_count')"
- ng-change="field_modified()"
- class="form-control" ng-model="patron.claims_never_checked_out_count"/>
- </div>
+ [% draw_form_input('au', 'claims_never_checked_out_count', '', 'number') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.claims_never_checked_out_count.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.claims_never_checked_out_count.example']}}") %]
- </span>
+ [% draw_example_text('au', 'claims_never_checked_out_count') %]
</div>
</div>
ng-pattern="field_pattern('au', 'alert_message')"
ng-change="field_modified()"
ng-blur="handle_field_changed(patron, 'alert_message')">
+ </textarea>
</div>
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.au.alert_message.example']">
- [% l('Example: [_1]',
- "{{org_settings['ui.patron.edit.au.alert_message.example']}}") %]
- </span>
+ [% draw_example_text('au', 'alert_message') %]
</div>
</div>
<!-- ADDRESS_TYPE -->
<div class="row reg-field-row" ng-show="show_field('aua.address_type')">
[% draw_field_label('aua', 'address_type') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'address_type')"
- class="form-control"
- ng-model="patron.addresses[$index].address_type"
- ng-blur="handle_field_changed(patron.addresses[$index], 'address_type')"/>
- </div>
+ [% draw_form_input('aua', 'address_type', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.address_type.example']">
- Example: {{org_settings['ui.patron.edit.aua.address_type.example']}}
- </span>
+ [% draw_example_text('au', 'address_type') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.post_code')">
[% draw_field_label('aua', 'post_code') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'post_code')"
- class="form-control"
- ng-model="patron.addresses[$index].post_code"
- ng-blur="handle_field_changed(patron.addresses[$index], 'post_code')"/>
- </div>
+ [% draw_form_input('aua', 'post_code', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.post_code.example']">
- Example: {{org_settings['ui.patron.edit.aua.post_code.example']}}
- </span>
+ [% draw_example_text('au', 'post_code') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.street1')">
[% draw_field_label('aua', 'street1') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'street1')"
- class="form-control"
- ng-model="patron.addresses[$index].street1"
- ng-blur="handle_field_changed(patron.addresses[$index], 'street1')"/>
- </div>
+ [% draw_form_input('aua', 'street1', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.street1.example']">
- Example: {{org_settings['ui.patron.edit.aua.street1.example']}}
- </span>
+ [% draw_example_text('au', 'street1') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.street2')">
[% draw_field_label('aua', 'street2') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'street2')"
- class="form-control"
- ng-model="patron.addresses[$index].street2"
- ng-blur="handle_field_changed(patron.addresses[$index], 'street2')"/>
- </div>
+ [% draw_form_input('aua', 'street2', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.street2.example']">
- Example: {{org_settings['ui.patron.edit.aua.street2.example']}}
- </span>
+ [% draw_example_text('au', 'street2') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.city')">
[% draw_field_label('aua', 'city') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'city')"
- class="form-control"
- ng-model="patron.addresses[$index].city"
- ng-blur="handle_field_changed(patron.addresses[$index], 'city')"/>
- </div>
+ [% draw_form_input('aua', 'city', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.city.example']">
- Example: {{org_settings['ui.patron.edit.aua.city.example']}}
- </span>
+ [% draw_example_text('au', 'city') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.county')">
[% draw_field_label('aua', 'county') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'county')"
- class="form-control"
- ng-model="patron.addresses[$index].county"
- ng-blur="handle_field_changed(patron.addresses[$index], 'county')"/>
- </div>
+ [% draw_form_input('aua', 'county', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.county.example']">
- Example: {{org_settings['ui.patron.edit.aua.county.example']}}
- </span>
+ [% draw_example_text('au', 'county') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.state')">
[% draw_field_label('aua', 'state') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'state')"
- class="form-control"
- ng-model="patron.addresses[$index].state"
- ng-blur="handle_field_changed(patron.addresses[$index], 'state')"/>
- </div>
+ [% draw_form_input('aua', 'state', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.state.example']">
- Example: {{org_settings['ui.patron.edit.aua.state.example']}}
- </span>
+ [% draw_example_text('au', 'state') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.country')">
[% draw_field_label('aua', 'country') %]
- <div class="col-md-3 reg-field-input">
- <input type="text"
- ng-change="field_modified()"
- ng-pattern="field_pattern('aua', 'country')"
- class="form-control"
- ng-model="patron.addresses[$index].country"
- ng-blur="handle_field_changed(patron.addresses[$index], 'country')"/>
- </div>
+ [% draw_form_input('aua', 'country', 'addresses[$index]') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.country.example']">
- Example: {{org_settings['ui.patron.edit.aua.country.example']}}
- </span>
+ [% draw_example_text('au', 'country') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.valid')">
[% draw_field_label('aua', 'valid') %]
- <div class="col-md-3 reg-field-input">
- <input type="checkbox"
- class="form-control"
- ng-model="patron.addresses[$index].valid"
- ng-blur="handle_field_changed(patron.addresses[$index], 'valid')"/>
- </div>
+ [% draw_form_input('aua', 'valid', 'addresses[$index]', 'checkbox') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.valid.example']">
- Example: {{org_settings['ui.patron.edit.aua.valid.example']}}
- </span>
+ [% draw_example_text('au', 'valid') %]
</div>
</div>
<div class="row reg-field-row" ng-show="show_field('aua.within_city_limits')">
[% draw_field_label('aua', 'within_city_limits') %]
- <div class="col-md-3 reg-field-input">
- <input type="checkbox"
- class="form-control"
- ng-model="patron.addresses[$index].within_city_limits"
- ng-blur="handle_field_changed(patron.addresses[$index], 'within_city_limits')"/>
- </div>
+ [% draw_form_input('aua', 'within_city_limits', 'addresses[$index]', 'checkbox') %]
<div class="col-md-6 patron-reg-example">
- <span ng-if="org_settings['ui.patron.edit.aua.within_city_limits.example']">
- Example: {{org_settings['ui.patron.edit.aua.within_city_limits.example']}}
- </span>
+ [% draw_example_text('au', 'within_city_limits') %]
</div>
</div>