diff --git a/docs/urls.md b/docs/urls.md index c85f63d..26b579c 100644 --- a/docs/urls.md +++ b/docs/urls.md @@ -27,9 +27,13 @@ For cleaner and prettier url you can use url rewriting. When using Apache, simpl code below into a *.htaccess* file in the same directory as Atomik's core file. RewriteEngine on + # Allow access to assets folder RewriteRule ^app/plugins/(.+)/assets - [L] - RewriteRule ^app/ - [L,F] - RewriteRule ^vendor/ - [L,F] + RewriteRule ^vendor/maximebf/debugbar/src/DebugBar/Resources - [L] + # forbid access to files and folders under app and vendor + RewriteRule ^app/.*$ - [L,F] + RewriteRule ^vendor/.*$ - [L,F] + # rewrite to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?action=$1 [L,QSA] diff --git a/src/helpers/form.php b/src/helpers/form.php index a8d5547..4bed6f9 100644 --- a/src/helpers/form.php +++ b/src/helpers/form.php @@ -72,6 +72,41 @@ public function input($name, $value = '', $type = 'text', $attrs = array()) return sprintf('', Atomik::htmlAttributes($attrs)); } + + public function password($name, $attrs = array()) + { + return $this->input($name, '', 'password', $attrs); + } + + public function email($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'email', $attrs); + } + + public function date($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'date', $attrs); + } + + public function time($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'time', $attrs); + } + + public function number($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'number', $attrs); + } + + public function url($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'url', $attrs); + } + + public function datetime($name, $value = '', $attrs = array()) + { + return $this->input($name, $value, 'datetime', $attrs); + } public function checkbox($name, $checked = false, $value = 1, $attrs = array()) {