This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$string = '7 - 21'; | |
echo preg_replace([ | |
'/1[1-9]{1}$/', | |
'/[1]{1}$/', | |
'/[2-4]{1}$/', | |
'/[0,5-9]{1}$/', | |
], [ | |
'$0 дней', | |
'$0 день', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
//autofill event hack | |
$('input.phone').one('animationstart', function(e, f) { | |
var animationName = e.originalEvent.animationName; | |
console.log(animationName); | |
if (animationName == 'onAutoFillCancel') { | |
$(this).inputmask("+7 (999) 999-99-99"); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace common\modules\appearance\widgets\backend; | |
use yii\web\JsExpression; | |
/** | |
* Selectize customization | |
* | |
* @author Michail Urakov |