diff --git a/common/messages/ru/core.php b/common/messages/ru/core.php index 8e75cf7..978e69d 100644 --- a/common/messages/ru/core.php +++ b/common/messages/ru/core.php @@ -61,4 +61,6 @@ return [ 'message' => 'Сообщение', 'Comment posted' => 'Ваш комментарий появится после проверки модератором', 'date' => 'Дата', + 'service' => 'Услуга', + 'time' => 'Время', ]; \ No newline at end of file diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 53d0174..7410d06 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -487,6 +487,20 @@ _________________________________________________________ --> "Время" ); + $serviceItems = [ "Услуга не выбрана" => "Выберите услугу"]; + foreach ($pageCategories as $pageCategory){ + /** + * @var PageCategory $pageCategory + */ + foreach ( $pageCategory->pages as $servicePage ){ + /** + * @var \artbox\core\models\Page $servicePage + */ + $pageTitle = $servicePage->lang->title; + $serviceItems[$pageTitle] = $pageTitle; + } + } + echo $formAppointment->field( $appointment, "service", @@ -494,7 +508,7 @@ _________________________________________________________ --> 'options' => [ 'class' => 'form-group field-appointment-service', ], - 'template' => "
{label}\n{input}\n", + 'template' => "{label}\n{input}\n", 'inputOptions' => [ 'id' => 'appointment-service' ], @@ -504,6 +518,17 @@ _________________________________________________________ --> ], ] ) + ->dropDownList( + $serviceItems, + [ + 'options' => [ + "Услуга не выбрана" => [ + 'disabled' => true, + 'selected' => true, + ] + ] + ] + ) ->label( "Услуга" ); @@ -602,7 +627,7 @@ _________________________________________________________ --> -- libgit2 0.21.4