focus-me="focus_usrname"
ng-blur="usrname_changed(patron.usrname)"
class="form-control" ng-model="[% model %]"/>
+ [% ELSIF field == 'day_phone' %]
+ <input type="text"
+ ng-blur="day_phone_changed(patron.day_phone)"
+ class="form-control" ng-model="[% model %]"/>
[% ELSE %]
<input type="[% input_type %]"
class="form-control" ng-model="[% model %]"/>
[% IF field == 'barcode' %]
- <button class="btn btn-default"
+ <button class="btn btn-default" ng-show="!patron.isnew"
ng-click="replace_card()">[% l('Replace Barcode') %]</button>
<button class="btn btn-default"
ng-click="cards_dialog()">[% l('See All') %]</button>
<!-- invalidate buttons -->
[% IF field.match('phone') OR field.match('email') %]
- <button ng-show="patron.[% field %]" class="btn btn-default"
+ <button ng-show="patron.[% field %] && !patron.isnew" class="btn btn-default"
ng-click="">[% l('Invalidate') %]</button>
[% END %]
address_type : egCore.strings.REG_ADDR_TYPE,
_is_mailing : true,
_is_billing : true,
- within_city_limits : true
+ within_city_limits : false
};
var card = {
$scope.patron.cards.push(new_card);
}
+ $scope.day_phone_changed = function(phone) {
+ if (phone && $scope.org_settings['patron.password.use_phone']) {
+ $scope.patron.passwd = phone.substr(-4);
+ }
+ }
+
$scope.barcode_changed = function(bc) {
if (!bc) return;
egCore.net.request(