Skip to content

Commit

Permalink
Added
Browse files Browse the repository at this point in the history
- Another UI tweak for fallback default template name input.
  • Loading branch information
Mark Notton committed Oct 15, 2018
1 parent 3385d14 commit 3cdcc7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/assets/scripts/template-maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ if ( typeof templateMaker !== 'undefined' && 'fetch' in window) {
// Update the template field on-the-fly whilst the handle input changes.
handleInput.on('change input', function() {
templatemaker.template.val(handleInput.val().replace(/[^a-zA-Z0-9-_]/g, '').toLowerCase());
if ( templatemaker.template.val() == templatemaker.path.val()) {
templatemaker.template.first().val('index');
}
});

}
Expand Down

0 comments on commit 3cdcc7a

Please sign in to comment.