Example #1
0
echo Lang::t('main/dialogs', 'modalAddLocation_title');
?>
</h4>
            </div>
            <div class="modal-body">
                <?php 
$form = ActiveForm::begin(['id' => 'locationAddForm']);
echo $form->field($location, 'lat')->label(false)->hiddenInput();
echo $form->field($location, 'lng')->label(false)->hiddenInput();
echo $form->field($location, 'zoom')->label(false)->hiddenInput();
if (!empty($setLocationType)) {
    $location->type = $setLocationType;
    echo $form->field($location, 'type')->label(false)->hiddenInput();
    echo Html::hiddenInput('type_local', Lang::t('main/location', 'school'), ['id' => 'location-type-local']);
} else {
    echo $form->field($location, 'type')->dropDownList(Location::getLocationTypeLocal());
}
echo $form->field($location, 'title')->label(Lang::t('main/dialogs', 'modalAddLocation_fieldTitle'));
echo $form->field($location, 'description')->textarea(['maxlength' => 255])->label(Lang::t('main/dialogs', 'modalAddLocation_fieldDescription'));
ActiveForm::end();
?>
                <div id="map"></div>
            </div>
            <div class="modal-footer">
                <button type="button" id="btnAddLocation" class="btn btn-primary" data-dismiss="modal"><?php 
echo Lang::t('main/dialogs', 'modalAddLocation_btn');
?>
</button>
                <button type="button" id="btnEditLocation" class="btn btn-primary" data-dismiss="modal"><?php 
echo Lang::t('main/dialogs', 'modalEditLocation_btn');
?>