/templates/page/create.mako
https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 14 lines · 13 code · 1 blank · 0 comment · 2 complexity · 0f42fa4fe927bd92648123dcbae20eb5 MD5 · raw file
- <%inherit file="/form.mako"/>
- <%def name="javascripts()">
- ${parent.javascripts()}
- <script type="text/javascript">
- $(function(){
- var page_name = $("input[name=page_title]");
- var page_slug = $("input[name=page_slug]");
- page_name.keyup(function(){
- page_slug.val( $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase() )
- });
- })
- </script>
- </%def>