/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

  1. <%inherit file="/form.mako"/>
  2. <%def name="javascripts()">
  3. ${parent.javascripts()}
  4. <script type="text/javascript">
  5. $(function(){
  6. var page_name = $("input[name=page_title]");
  7. var page_slug = $("input[name=page_slug]");
  8. page_name.keyup(function(){
  9. page_slug.val( $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase() )
  10. });
  11. })
  12. </script>
  13. </%def>