Commit ef6e29bb authored by Tino Goratsch's avatar Tino Goratsch

added a new form field renderer for file input fields

parent e21d7f49
......@@ -3,13 +3,9 @@
{extends file="asset:System/ajax-form.tpl"}
{block AJAX_FORM_CONTENT}
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength="120" label={lang t="categories|title"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="description" value=$form.description required=true maxlength="120" label={lang t="system|description"}}
<div class="form-group">
<label for="picture" class="col-sm-2 control-label">{lang t="categories|picture"}</label>
<div class="col-sm-10"><input type="file" id="picture" name="picture"></div>
</div>
{include file="asset:System/Partials/form_group.input_text.tpl" name="title" value=$form.title required=true maxlength="120" label={lang t="categories|title"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="description" value=$form.description required=true maxlength="120" label={lang t="system|description"}}
{include file="asset:System/Partials/form_group.input_file.tpl" name="picture" label={lang t="categories|picture"}}
{block CATEGORIES_MODULE}
<div class="form-group">
<label for="module" class="col-sm-2 control-label required">{lang t="categories|module"}</label>
......
......@@ -6,11 +6,7 @@
{include file="asset:System/Partials/form_group.input_text.tpl" name="code" value=$form.code required=true maxlength=10 label={lang t="emoticons|code"}}
{include file="asset:System/Partials/form_group.input_text.tpl" name="description" value=$form.description required=true maxlength=15 label={lang t="system|description"}}
{block EMOTICONS_PICTURE_UPLOAD}
<div class="form-group">
<label for="picture" class="col-sm-2 control-label required">{lang t="emoticons|picture"}</label>
<div class="col-sm-10"><input type="file" name="picture" id="picture" required></div>
</div>
{include file="asset:System/Partials/form_group.input_file.tpl" name="picture" required=true label={lang t="emoticons|picture"}}
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{/block}
{extends file="asset:Emoticons/Admin/index.create.tpl"}
{block EMOTICONS_PICTURE_UPLOAD}
<div class="form-group">
<label for="picture" class="col-sm-2 control-label">{lang t="emoticons|replace_picture"}</label>
<div class="col-sm-10"><input type="file" name="picture" id="picture"></div>
</div>
{/block}
\ No newline at end of file
{include file="asset:System/Partials/form_group.input_file.tpl" name="picture" label={lang t="emoticons|replace_picture"}}
{/block}
......@@ -4,10 +4,7 @@
{block AJAX_FORM_CONTENT}
{block GALLERY_PICTURE_UPLOAD}
<div class="form-group">
<label for="file" class="col-sm-2 control-label required">{lang t="gallery|select_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file" required></div>
</div>
{include file="asset:System/Partials/form_group.input_file.tpl" name="file" required=true label={lang t="gallery|select_picture"}}
{/block}
<div class="form-group">
<label for="description" class="col-sm-2 control-label">{lang t="system|description"}</label>
......
{extends file="asset:Gallery/Admin/pictures.create.tpl"}
{block GALLERY_PICTURE_UPLOAD}
<div class="form-group">
<label for="file" class="col-sm-2 control-label">{lang t="gallery|select_new_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file"></div>
</div>
{/block}
\ No newline at end of file
{include file="asset:System/Partials/form_group.input_file.tpl" name="picture" label={lang t="gallery|select_new_picture"}}
{/block}
{extends file="asset:System/Partials/form_group.input_text.tpl"}
{block FORM_GROUP_INPUT_TYPE}file{/block}
{$use_form_control=false}
......@@ -2,7 +2,7 @@
{block FORM_GROUP_LABEL_ID}{$name|replace:'_':'-'}{/block}
{block FORM_GROUP_FORM_FIELD}
<input class="form-control"
<input {if isset($use_form_control) && $use_form_control === false}{else}class="form-control"{/if}
type="{block FORM_GROUP_INPUT_TYPE}text{/block}"
name="{$name}"
id="{$name|replace:'_':'-'}"
......
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