Initial commit
This commit is contained in:
40
templates/_dashboard/monster/_form.html.twig
Normal file
40
templates/_dashboard/monster/_form.html.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{{ form_start(form, {'attr': {'class': 'sp_form__xhr'}}) }}
|
||||
<div class="sp_form-row__text">
|
||||
{{ form_label(form.name) }}
|
||||
{{ form_widget(form.name) }}
|
||||
</div>
|
||||
<div class="sp_form-row__text">
|
||||
{{ form_label(form.slug) }}
|
||||
{{ form_widget(form.slug) }}
|
||||
</div>
|
||||
<div class="sp_form-row__textarea">
|
||||
{{ form_label(form.description) }}
|
||||
{{ form_widget(form.description) }}
|
||||
</div>
|
||||
<div class="sp_form-row__file">
|
||||
{{ form_label(form.icon) }}
|
||||
<input name="file-path" type="text" disabled>
|
||||
<span class="sp_input__file-preview">
|
||||
<img id="item-icon-preview" src="{{ asset(monster.icon ? assets.monster.upload_path ~ monster.icon : assets.img._blank_xs) }}" alt>
|
||||
</span>
|
||||
{{ form_widget(form.icon, {'attr': {'data-file-preview-target': 'item-icon-preview'}}) }}
|
||||
</div>
|
||||
<div class="sp_form-row__select">
|
||||
{{ form_label(form.version) }}
|
||||
{{ form_widget(form.version) }}
|
||||
</div>
|
||||
{% if route|end_with('_edit') %}
|
||||
<div>
|
||||
{{ form_label(form.removeFile) }}
|
||||
{{ form_widget(form.removeFile) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="sp_form-row__button">
|
||||
<a class="sp_button" href="{{ path('bo_monster_index', {'monsterCategoryId': monsterCategory.id}) }}" data-type="cancel">
|
||||
<span>Cancel</span>
|
||||
</a>
|
||||
<button class="sp_button" data-type="validate" type="submit">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
Reference in New Issue
Block a user