blob: 20b6b1d6064250114a218bf68d57f7089cdf796a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{strip}
<div class="form-group">
{formlabel label=$label|default:"Primary Attachment" for="primary_attachment_id"}
{forminput}
<input type="text" name="primary_attachment_id" id="primary_attachment_id" />
{formhelp note="Enter an existing attachment id to use. Please use the attachment browser to find attachment ids."}
{/forminput}
</div>
{assign var=primary_attachment_id value=$gContent->getField('primary_attachment_id')}
{if !empty($primary_attachment_id)}
<div class="form-group">
{formlabel label="Current Attachment" for=""}
{forminput}
{assign var=storage value=$gContent->mStorage[$primary_attachment_id]}
{jspopup href=$storage.source_url title=$storage.title|default:$storage.filename notra=1 img=$storage.thumbnail_url.avatar}
{formhelp note="Click to see large preview"}
{/forminput}
</div>
{/if}
{* $no_plugins is set by the including template *}
{if $gBitUser->hasPermission('p_liberty_attach_attachments') && !$no_plugins}
{foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
{if $plugin.is_active eq 'y' && $plugin.primary_edit_field && $plugin.plugin_type eq 'storage'}
<div class="form-group">
{assign var=label value="Upload $label"}
{formlabel label=$label|default:"Upload new Attachment" for=""}
{forminput}
{$plugin.primary_edit_field}
{formhelp note=$plugin.edit_help}
{/forminput}
</div>
{/if}
{/foreach}
{/if}
{/strip}
|