Beispiel #1
0
 public function actionTestaa($id, $id2)
 {
     $bakteeri = Bakteeri::findOne($id);
     $nayteTiedot = NosAnalysoitavat::find()->where(['nos_id' => $id2, 'bakteeri_id' => $id])->all();
     $osanayte = $nayteTiedot[0]['osanaytteita_n'];
     $otetut_naytteet = $nayteTiedot[0]['otetut_naytteet_lkm'];
     $bNimi = $bakteeri->nimi;
     $bId = $bakteeri->id;
     $data = ['nimi' => $bNimi, 'id' => $bId, 'otetut_naytteet' => $otetut_naytteet, 'osanayte' => $osanayte];
     return Json::encode($data);
 }
Beispiel #2
0
                     </div>
                     <div class="clearfix"></div>
                 </div>
                 <?php 
 echo '<div class="panel-body" id="analyysi">';
 ?>
                     <?php 
 // necessary for update action.
 if (!$modelsBakteeri->isNewRecord) {
     echo Html::activeHiddenInput($modelsBakteeri, "[{$i}]id");
 }
 ?>
                     
                     <div class="row">
                     <?php 
 echo $form->field($modelsBakteeri, "[{$i}]bakteeri_id")->dropDownList(ArrayHelper::map(Bakteeri::find()->all(), 'id', 'nimi'), ['prompt' => 'Valitse']);
 ?>
                  
                         <div class="col-sm-6">
                             <?php 
 echo $form->field($modelsBakteeri, "[{$i}]m_arvo1")->textInput(['maxlength' => true]);
 ?>
                         </div>
                         <div class="col-sm-6">
                             <?php 
 echo $form->field($modelsBakteeri, "[{$i}]M_arvo2")->textInput(['maxlength' => true]);
 ?>
                         </div>
                           <div class="col-sm-6">
                             <?php 
 echo $form->field($modelsBakteeri, "[{$i}]osanaytteita_n")->textInput();