diff --git a/backend/modules/card/views/user-card/_form.php b/backend/modules/card/views/user-card/_form.php
index c710dc8..317936c 100755
--- a/backend/modules/card/views/user-card/_form.php
+++ b/backend/modules/card/views/user-card/_form.php
@@ -130,7 +130,7 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'fields')->widget(MultipleInput::class, [
-
+ 'cloneButton' => true,
'columns' => [
[
'name' => 'field_id',
@@ -159,8 +159,12 @@ use yii\widgets\ActiveForm;
'options' => [
'class' => 'input-priority'
]
- ]
- ]
+ ],
+ ],
+// 'extraButtons' => function ($model, $index, $context) {
+// Html::addCssClass($options, 'btn multiple-input-list__btn js-input-plus btn btn-default');
+// return Html::tag('div', Html::a('', ['index'], ['class' => 'glyphicon glyphicon-plus plus-icon']), $options);
+// },
])->label('Дополнительно');
?>
diff --git a/common/models/FieldsValueNew.php b/common/models/FieldsValueNew.php
index e382edd..f6ee1ae 100644
--- a/common/models/FieldsValueNew.php
+++ b/common/models/FieldsValueNew.php
@@ -13,6 +13,7 @@ use Yii;
* @property int $item_type
* @property int $order
* @property string $value
+ * @property string $option
*/
class FieldsValueNew extends \yii\db\ActiveRecord
{
@@ -36,7 +37,7 @@ class FieldsValueNew extends \yii\db\ActiveRecord
return [
[['field_id', 'item_id', 'item_type'], 'required'],
[['field_id', 'item_id', 'item_type', 'order'], 'integer'],
- [['value'], 'string'],
+ [['value', 'type_file'], 'string'],
];
}
@@ -52,6 +53,7 @@ class FieldsValueNew extends \yii\db\ActiveRecord
'item_type' => 'Item Type',
'order' => 'Order',
'value' => 'Value',
+ 'type_file' => 'Приложение'
];
}
diff --git a/console/migrations/m190726_064708_add_option_column.php b/console/migrations/m190726_064708_add_option_column.php
new file mode 100644
index 0000000..ff8a4ce
--- /dev/null
+++ b/console/migrations/m190726_064708_add_option_column.php
@@ -0,0 +1,25 @@
+addColumn('fields_value_new', 'type_file', $this->string(255)->defaultValue(null));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ $this->dropColumn('fields_value_new', 'type_file');
+ }
+}