Beispiel #1
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="nos-form">

    <?php 
$form = ActiveForm::begin(['id' => 'dynamic-form']);
?>
     
      <?php 
echo $form->field($model, 'naytteenottopvm')->widget(DatePicker::className(), ['name' => 'deadline', 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'removeButton' => ['title' => 'Tyhjennä'], 'pickerButton' => ['title' => 'Valitse päivä'], 'value' => date('yyyy-mm-dd'), 'options' => ['placeholder' => 'Valitse'], 'language' => 'fi', 'pluginOptions' => ['format' => 'yyyy-mm-dd', 'todayHighlight' => true, 'startDate' => 'today', 'todayBtn' => true, 'multidate' => true]]);
?>
  
     
    <?php 
echo $form->field($model, 'tuote_id')->widget(Select2::classname(), ['data' => ArrayHelper::map(Tuote::find()->all(), 'id', 'nimi'), 'language' => 'fi', 'options' => ['placeholder' => 'Valitse'], 'pluginOptions' => ['allowClear' => true]]);
?>

    



    <div class="row" style="width:80% display:table" >

     <div class="panel panel-default">
        <div class="panel-heading" style="width:80%" ><h4><i class="glyphicon glyphicon-option-vertical"></i> Analysoitavat bakteerit</h4></div>
        <div class="panel-body">
             <?php 
DynamicFormWidget::begin(['widgetContainer' => 'dynamicform_wrapper', 'widgetBody' => '.container-items', 'widgetItem' => '.item', 'limit' => 4, 'min' => 1, 'insertButton' => '.add-item', 'deleteButton' => '.remove-item', 'model' => $modelsBakteeri[0], 'formId' => 'dynamic-form', 'formFields' => ['nimi', 'm_oletusarvo1', 'M_oletusarvo2', 'Osanaytteita_n', 'Osanaytteidenmaara_c']]);
?>
Beispiel #2
0
 /**
  * Finds the Tuote model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Tuote the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Tuote::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Beispiel #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTuotes()
 {
     return $this->hasMany(Tuote::className(), ['yritys_id' => 'id']);
 }
Beispiel #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTuote()
 {
     return $this->hasOne(Tuote::className(), ['id' => 'tuote_id']);
 }