Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Improve] Alphanumeric only on module name
#1
We have a few small mistakes when making module. Module name should be alphanumeric only. If you feel this is important , please update the following files:

1. file add.php on application/views/builtin/manage/generators/
2. add this script into your javascript file inside jquery document ready:

Code:
  /* ------------------------------------------------------------------------------
   * force user to only type alpha numeric only
   * ------------------------------------------------------------------------------ */
   $(".alpha-num-only").keypress(function(e) {
       var regex = new RegExp("^[a-zA-Z0-9]+$");
       var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
       if (regex.test(str)) {
           return true;
       }

       e.preventDefault();
       return false;
   });

or if you are confused, please copy this file to the following folder:
1. file add.php on application/views/builtin/manage/generators/
2. file sgt.main.js on assets/a_js/custom/

Enjoy  Angel


Attached Files
.zip   improvement.zip (Size: 9.75 KB / Downloads: 0)
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)