Commit e21d7f49 authored by Tino Goratsch's avatar Tino Goratsch

improved the flexibility of the ajax-form layout

parent a6166852
{extends file="asset:`$LAYOUT`"}
{$is_multipart=true}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
{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="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>
{block CATEGORIES_MODULE}
<div class="form-group">
<label for="module" class="col-sm-2 control-label required">{lang t="categories|module"}</label>
<div class="col-sm-10"><input type="file" id="picture" name="picture"></div>
</div>
{block CATEGORIES_MODULE}
<div class="form-group">
<label for="module" class="col-sm-2 control-label required">{lang t="categories|module"}</label>
<div class="col-sm-10">
<select class="form-control" name="module" id="module" required>
{foreach $mod_list as $row}
<option value="{$row.id}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
</div>
<div class="col-sm-10">
<select class="form-control" name="module" id="module" required>
{foreach $mod_list as $row}
<option value="{$row.id}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
</div>
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
</form>
{javascripts}
{include_js module="system" file="ajax-form"}
{/javascripts}
</div>
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/categories"}}
{/block}
{extends file="asset:`$LAYOUT`"}
{$is_multipart=true}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
{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>
{extends file="asset:System/ajax-form.tpl"}
<div class="col-sm-10"><input type="file" name="picture" id="picture" required></div>
</div>
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
</form>
{javascripts}
{include_js module="system" file="ajax-form"}
{/javascripts}
{block AJAX_FORM_CONTENT}
{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>
{/block}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/emoticons"}}
{/block}
{extends file="asset:`$LAYOUT`"}
{$is_multipart=true}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="files|file_statements"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
{datepicker name=['start', 'end'] value=[$form.start, $form.end]}
{extends file="asset:System/ajax-form.tpl"}
{block AJAX_FORM_CONTENT}
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="files|file_statements"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
{datepicker name=['start', 'end'] value=[$form.start, $form.end]}
</div>
<div id="tab-2" class="tab-pane fade">
<div class="form-group">
<label for="title" class="col-sm-2 control-label required">{lang t="files|title"}</label>
<div class="col-sm-10">
<input class="form-control"
type="text"
name="title"
id="title"
value="{$form.title}"
maxlength="120"
data-seo-slug-base="true"
required>
</div>
</div>
<div id="tab-2" class="tab-pane fade">
{block FILES_FILE_UPLOAD}
<div class="form-group">
<label for="title" class="col-sm-2 control-label required">{lang t="files|title"}</label>
<label for="file-internal" class="col-sm-2 control-label required">{lang t="files|file"}</label>
<div class="col-sm-10">
<input class="form-control"
type="text"
name="title"
id="title"
value="{$form.title}"
maxlength="120"
data-seo-slug-base="true"
required>
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="{$form.file_external}" maxlength="120">
</div>
</div>
{block FILES_FILE_UPLOAD}
<div class="form-group">
<label for="file-internal" class="col-sm-2 control-label required">{lang t="files|file"}</label>
{/block}
<div id="external-filesize" class="form-group">
<label for="filesize" class="col-sm-2 control-label required">{lang t="files|filesize"}</label>
<div class="col-sm-10">
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="{$form.file_external}" maxlength="120">
<div class="col-sm-4">
<div class="row">
<div class="col-sm-8">
<input class="form-control" type="text" name="filesize" id="filesize" value="{$form.filesize}" maxlength="15">
</div>
</div>
{/block}
<div id="external-filesize" class="form-group">
<label for="filesize" class="col-sm-2 control-label required">{lang t="files|filesize"}</label>
<div class="col-sm-4">
<div class="row">
<div class="col-sm-8">
<input class="form-control" type="text" name="filesize" id="filesize" value="{$form.filesize}" maxlength="15">
</div>
<div class="col-sm-4">
<label for="unit" class="sr-only">{lang t="files|unit"}</label>
<select class="form-control" name="unit" id="unit">
{foreach $units as $row}
<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
</select>
</div>
<div class="col-sm-4">
<label for="unit" class="sr-only">{lang t="files|unit"}</label>
<select class="form-control" name="unit" id="unit">
{foreach $units as $row}
<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="form-group">
<label for="text" class="col-sm-2 control-label required">{lang t="system|description"}</label>
</div>
<div class="form-group">
<label for="text" class="col-sm-2 control-label required">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</div>
</div>
<div class="form-group">
<label for="cat" class="col-sm-2 control-label required">{lang t="categories|category"}</label>
<div class="col-sm-10">{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</div>
</div>
<div class="form-group">
<label for="cat" class="col-sm-2 control-label required">{lang t="categories|category"}</label>
<div class="col-sm-10">
{include file="asset:Categories/Partials/create_list.tpl" categories=$categories}
</div>
<div class="col-sm-10">
{include file="asset:Categories/Partials/create_list.tpl" categories=$categories}
</div>
{if !empty($options)}
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
</div>
<div id="tab-3" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
{if !empty($options)}
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
</div>
<div id="tab-3" class="tab-pane fade">
{include file="asset:Seo/Partials/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/files"}}
</form>
</div>
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/files"}}
{javascripts}
{include_js module="files" file="admin/acp"}
{include_js module="system" file="ajax-form"}
{/javascripts}
{/block}
{extends file="asset:`$LAYOUT`"}
{$is_multipart=true}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
{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>
{/block}
{extends file="asset:System/ajax-form.tpl"}
{block AJAX_FORM_CONTENT}
{block GALLERY_PICTURE_UPLOAD}
<div class="form-group">
<label for="description" class="col-sm-2 control-label">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="description" value="`$form.description`" height="150" toolbar="simple"}</div>
<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>
{if isset($options)}
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery/index/edit/id_`$gallery_id`"}}
</form>
{javascripts}
{include_js module="system" file="ajax-form"}
{/javascripts}
{/block}
<div class="form-group">
<label for="description" class="col-sm-2 control-label">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="description" value="`$form.description`" height="150" toolbar="simple"}</div>
</div>
{if isset($options)}
{include file="asset:System/Partials/form_group.checkbox.tpl" options=$options label={lang t="system|options"}}
{/if}
{include file="asset:System/Partials/form_group.submit.tpl" form_token=$form_token back_url={uri args="acp/gallery/index/edit/id_`$gallery_id`"}}
{/block}
......@@ -8,6 +8,7 @@
<form action="{$REQUEST_URI}"
method="post"
accept-charset="UTF-8"
{if isset($is_multipart) && $is_multipart === true}enctype="multipart/form-data"{/if}
class="form-horizontal"
data-ajax-form="true"
data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
......
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