Esempio n. 1
0
echo $form->field($model, 'lower_bound', array_merge($fieldConfig, ['template' => "{label}\n<div class=\"input-group\"><span class=\"input-group-addon\">" . $form->field($model, 'include_lower_bound', array_merge($fieldConfig, ['template' => "{input}"]))->checkbox(['label' => false]) . "</span>{input}</div>\n{hint}\n{error}"]))->textInput(['maxlength' => true])->label(false);
?>

    <span><strong>to</strong></span>

    <?php 
echo $form->field($model, 'upper_bound', array_merge($fieldConfig, ['template' => "{label}\n<div class=\"input-group\">{input}\n<span class=\"input-group-addon\">" . $form->field($model, 'include_upper_bound', array_merge($fieldConfig, ['template' => "{input}"]))->checkbox(['label' => false]) . "</span></div>\n{hint}\n{error}"]))->textInput(['maxlength' => true])->label(false);
?>

    <?php 
echo $form->field($model, 'display', $fieldConfig)->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'sort', $fieldConfig)->hiddenInput(['data-field' => 'sort'])->label(false);
?>

    <?php 
echo $form->field($model, 'type', $fieldConfig)->hiddenInput()->label(false);
?>

    <?php 
echo $form->field($model, 'id', $fieldConfig)->hiddenInput()->label(false);
?>
</div>

<?php 
if (!isset($form)) {
    echo Html::submitButton($model->isNewRecord ? Module::t('module', 'Create') : Module::t('module', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-primary' : 'btn btn-success']);
    ActiveForm::end();
}
 /**
  * Deletes an existing FacetSet model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $this->findModel($id)->delete();
     Yii::$app->session->setFlash('success', Module::t('facetSet', 'Facet set has been successfully deleted.'));
     return $this->redirect(['index']);
 }