Commit 8627ee38 by Van

feat(all): update fields

parent 35e6786a
......@@ -40,7 +40,7 @@ class FluxType extends AbstractType
),
])
->add(
'code',
'fluxcode',
TextType::class,
[
'label' => Translator::__('appolo.tourinsoft.code'),
......@@ -54,7 +54,7 @@ class FluxType extends AbstractType
]
])
->add(
'keys',
'fluxkeys',
KeyType::class,
[
'label' => false,
......
......@@ -16,9 +16,9 @@ class Flux extends Entity
/** @var string */
protected $title;
/** @var string */
protected $code;
protected $fluxcode;
/** @var array */
protected $keys;
protected $fluxkeys;
/** @var string */
protected $contentType;
......@@ -71,36 +71,36 @@ class Flux extends Entity
/**
* @return string
*/
public function getCode()
public function getFluxCode()
{
return $this->code;
return $this->fluxcode;
}
/**
* @param string $code
* @return Flux
*/
public function setCode($code)
public function setFluxCode($code)
{
$this->code = $code;
$this->fluxcode = $code;
return $this;
}
/**
* @return array
*/
public function getKeys()
public function getFluxKeys()
{
return $this->keys;
return $this->fluxkeys;
}
/**
* @param array $keys
* @return Flux
*/
public function setKeys($keys)
public function setFluxKeys($keys)
{
$this->keys = $keys;
$this->fluxkeys = $keys;
return $this;
}
......
......@@ -14,8 +14,8 @@ class Flux extends BaseTable
{
$this->table->addColumn('id', 'integer', ['autoincrement' => true]);
$this->table->addColumn('title', 'string', ['notnull' => true]);
$this->table->addColumn('code', 'string', ['notnull' => true]);
$this->table->addColumn('keys', 'json_array', ['notnull' => true]);
$this->table->addColumn('fluxcode', 'string', ['notnull' => true]);
$this->table->addColumn('fluxkeys', 'json_array', ['notnull' => true]);
$this->table->addColumn('contentType', 'string', ['notnull' => true]);
$this->table->addColumn('viewless', 'boolean', ['default' => false]);
$this->table->addColumn('searchable', 'boolean', ['default' => true]);
......
......@@ -24,21 +24,21 @@
</div>
<div data-bolt-fieldset="text">
<fieldset class="form-group bolt-field-text">
{{ form_label(form.code) }}
{{ form_label(form.fluxcode) }}
<div class="col-xs-12">
{{ form_widget(form.code) }}
{{ form_errors(form.code) }}
{{ form_widget(form.fluxcode) }}
{{ form_errors(form.fluxcode) }}
</div>
</fieldset>
</div>
{% for key in form.keys %}
{% for key in form.fluxkeys %}
<div data-bolt-fieldset="text">
<fieldset class="form-group bolt-field-text">
{{ form_label(attribute(form.keys, key.vars.name)) }}
{{ form_label(attribute(form.fluxkeys, key.vars.name)) }}
<div class="col-xs-12">
{{ form_widget(attribute(form.keys, key.vars.name)) }}
{{ form_errors(attribute(form.keys, key.vars.name)) }}
{{ form_widget(attribute(form.fluxkeys, key.vars.name)) }}
{{ form_errors(attribute(form.fluxkeys, key.vars.name)) }}
</div>
</fieldset>
</div>
......
......@@ -24,21 +24,21 @@
<div data-bolt-fieldset="text">
<fieldset class="form-group bolt-field-text">
{{ form_label(form.code) }}
{{ form_label(form.fluxcode) }}
<div class="col-xs-12">
{{ form_widget(form.code) }}
{{ form_errors(form.code) }}
{{ form_widget(form.fluxcode) }}
{{ form_errors(form.fluxcode) }}
</div>
</fieldset>
</div>
{% for key in form.keys %}
{% for key in form.fluxkeys %}
<div data-bolt-fieldset="text">
<fieldset class="form-group bolt-field-text">
{{ form_label(attribute(form.keys, key.vars.name)) }}
{{ form_label(attribute(form.fluxkeys, key.vars.name)) }}
<div class="col-xs-12">
{{ form_widget(attribute(form.keys, key.vars.name)) }}
{{ form_errors(attribute(form.keys, key.vars.name)) }}
{{ form_widget(attribute(form.fluxkeys, key.vars.name)) }}
{{ form_errors(attribute(form.fluxkeys, key.vars.name)) }}
</div>
</fieldset>
</div>
......
......@@ -35,9 +35,9 @@
<tr class="dim" id="item_1">
<td class="id hidden-xs">{{ item.id }}</td>
<td><span><strong>{{ item.title }}</strong></span></td>
<td>{{ item.code }}</td>
<td>{{ item.fluxcode }}</td>
<td>
{% for index, value in item.keys %}
{% for index, value in item.fluxkeys %}
<strong>{{ index }}</strong> : {{ value }}<br />
{% endfor %}
{#{{ item.key }}#}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment