Revision 57 (by ahitrov@rambler.ru, 2010/09/13 10:52:35) п·я┌п╪п╣п·я┌п╪п╣п╫п╣п╫п╦п╣п·я┬п╦п╠п╨пп╦ я▐п╡п╟я│п╨я─п╦п©я┌п╟
<input <% $prop->{readonly} ? 'readonly ' : '' %> type="text" name="<% $name %>" id="<% $name%>_text" size="60" value="" style="width: 95%;" onkeyup="<% $name %>_changed();">

<table id="<% $name %>_prev_table" style="width: 95%; display: none;" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td width="100%" class="bb undo" style="padding: 3px;">Отменить изменение пароля</td>
		<td style="padding-left: 3px; vertical-align: top;"><a href="#" onclick="return <% $name %>_undo();" title="Отменить изменения"><img src="/contenido/i/undo-19x19.gif" width="19" height="19" class="bb gb"></a></td>
	</tr>
</table>

<textarea id="<% $name %>_prev_value" style="display: none;"></textarea>

<script type="text/javascript">
	function <% $name %>_changed() {
		var t = document.getElementById('<% $name %>_prev_table');
		if ( document.getElementById('<% $name %>_text').value == '') {
			if (t.style.display!='none') {
				t.style.display = 'none';
			}
			return;
		}
		if (t.style.display=='none') {
			t.style.display = '';
		}
	}

	function <% $name %>_undo() {
		document.getElementById('<% $name %>_text').value = document.getElementById('<% $name %>_prev_value').value;
		<% $name %>_changed();
		return false;
	}
</script>

<%args>
	$name	=> undef
	$check	=> undef
	$prop	=> {}
</%args>