This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
tabellio.contact/tabellio/contact/form_templates/view_effectivecontact.pt

28 lines
1.0 KiB
XML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal">
<body>
<form method="post" action="." tal:attributes="action context/absolute_url">
<metal:use use-macro="context/@@ploneform-macros/fields" />
<metal:use use-macro="context/@@ploneform-macros/actions" />
<script type="text/javascript">
(function($) {
$().ready(function() {
$('#form-widgets-subject').after('<div id="service"' + '><' + '/div>');
$('div#service').hide();
$('#form-widgets-subject').change(function() { /* screw accessibility :/ */
if ($(this).attr('value') == '-deputy') {
window.location = window.location + '/deputy';
return false;
} else {
$('div#service').show().load(window.location + '/service?id=' + $(this).attr('value'));
return false;
}
});
});
})(jQuery);
</script>
</form>
</body>
</html>