[add] azerty layout

This commit is contained in:
Knah Tsaeb 2016-03-24 15:47:07 +01:00
parent 9c3d5be2a2
commit c59702b5c5
4 changed files with 14 additions and 9 deletions

View file

@ -49,6 +49,7 @@
<div class="row" style="margin-top: 30px;"> <div class="row" style="margin-top: 30px;">
<p>What's your Keyboard layout?</p> <p>What's your Keyboard layout?</p>
<select type="text" name="keyboardlayout"> <select type="text" name="keyboardlayout">
<option value="azerty">AZERTY</option>
<option value="qwerty">QWERTY</option> <option value="qwerty">QWERTY</option>
<option value="qwertz">QWERTZ</option> <option value="qwertz">QWERTZ</option>
</select> </select>

View file

@ -80,6 +80,10 @@ class Configuration
*/ */
public static function evalKeys($keys) public static function evalKeys($keys)
{ {
// Return azerty
if (strtolower($keys) === 'azerty') {
return 'AZERTYUIOPQSDFGHJKLMWXCVBN';
}
// Return qwertz // Return qwertz
if (strtolower($keys) === 'qwertz') { if (strtolower($keys) === 'qwertz') {
return 'QWERTZUIOPASDFGHJKLYXCVBNM'; return 'QWERTZUIOPASDFGHJKLYXCVBNM';

View file

@ -105,7 +105,7 @@ class RequestUtils
{ {
if ( if (
isset($_POST['keyboardlayout']) && isset($_POST['keyboardlayout']) &&
preg_match("/qwerty|qwertz/", $_POST['keyboardlayout']) preg_match("/azerty|qwerty|qwertz/", $_POST['keyboardlayout'])
) { ) {
return strtolower($_POST['keyboardlayout']); return strtolower($_POST['keyboardlayout']);
} }