Sha256: f05a36d6b71ee66e8da59e77505c3c161d212a89cbeda473b324f423d0ee63a0
Contents?: true
Size: 392 Bytes
Versions: 3
Compression:
Stored size: 392 Bytes
Contents
/* global $ */ function FormInputMapper(element) { this._hiddenInput = $(element).find('input[type="hidden"]'); this.active = !!this._hiddenInput.length; } FormInputMapper.prototype.getId = function() { return parseInt(this._hiddenInput.attr('value'), 10); }; FormInputMapper.prototype.setId = function(id) { if (!this.active) { return; } this._hiddenInput.attr('value', id); };
Version data entries
3 entries across 3 versions & 1 rubygems