@@ -70,7 +70,7 @@ use common\models\Producer; | |||
])->hiddenInput(); ?> | |||
<?php else: ?> | |||
<?php | |||
$usersArray = User::findBy()->orderBy('type DESC')->all(); | |||
$usersArray = User::findBy()->orderBy('type DESC, name_legal_person ASC, lastname ASC, name ASC')->all(); | |||
?> | |||
<?= $form->field($model, 'id_user', [ | |||
'template' => '{label} <a href="' . Yii::$app->urlManager->createUrl(['user/create']) . '" class="btn btn-xs btn-default">Nouvel utilisateur <span class="glyphicon glyphicon-plus"></span></a><div>{input}</div>{hint}', |
@@ -46,6 +46,7 @@ $(document).ready(function() { | |||
opendistrib_product_prices() ; | |||
opendistrib_confirm_delete() ; | |||
opendistrib_product_availability_points_sale(); | |||
opendistrib_user_index(); | |||
opendistrib_menu_treeview(); | |||
}) ; | |||
@@ -59,6 +60,12 @@ var UrlManager = { | |||
} | |||
}; | |||
function opendistrib_user_index() { | |||
if($('body').hasClass('user-index')) { | |||
$('#w0-filters input:first').focus(); | |||
} | |||
} | |||
function opendistrib_menu_treeview() { | |||
$('li.treeview a').unbind('click').click(function() { | |||
var href = $(this).attr('href'); |