Commit 8627ee38 by Van

feat(all): update fields

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