]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - tpl/editlink.html
Merge branch 'picwall-direct-link' into next
[github/shaarli/Shaarli.git] / tpl / editlink.html
CommitLineData
45034273
SS
1<!DOCTYPE html>
2<html>
246e9b4e 3<head>{include="includes"}
bdd1715b
A
4 <link type="text/css" rel="stylesheet" href="../inc/awesomplete.css" />
5 <script src="inc/awesomplete.min.js#"></script>
246e9b4e 6</head>
bb8f712d 7<body
ae22a12b
T
8{if="$link.title==''"}onload="document.linkform.lf_title.focus();"
9{elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
45034273
SS
10{else}onload="document.linkform.lf_tags.focus();"{/if} >
11<div id="pageheader">
12 {include="page.header"}
13 <div id="editlinkform">
14 <form method="post" name="linkform">
15 <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
bdd1715b
A
16 <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url|htmlspecialchars}" class="lf_input"><br>
17 <label for="lf_title"><i>Title</i></label><br><input type="text" name="lf_title" id="lf_title" value="{$link.title|htmlspecialchars}" class="lf_input"><br>
18 <label for="lf_description"><i>Description</i></label><br><textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description|htmlspecialchars}</textarea><br>
19 <label for="lf_tags"><i>Tags</i></label><br>
20 <input type="text" id="lf_tags" name="lf_tags" id="lf_tags" value="{$link.tags|htmlspecialchars}" class="lf_input"
21 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple autocomplete="off" ><br>
ae22a12b 22 {if="($link_is_new && $GLOBALS['privateLinkByDefault']==true) || $link.private == true"}
bb8f712d
KT
23 <input type="checkbox" checked="checked" name="lf_private" id="lf_private">
24 &nbsp;<label for="lf_private"><i>Private</i></label><br>
25 {else}
26 <input type="checkbox" name="lf_private" id="lf_private">
27 &nbsp;<label for="lf_private"><i>Private</i></label><br>
28 {/if}
c133612f
V
29 <input type="submit" value="Save" name="save_edit" class="bigbutton">
30 <input type="submit" value="Cancel" name="cancel_edit" class="bigbutton">
31 {if="!$link_is_new"}<input type="submit" value="Delete" name="delete_link" class="bigbutton delete" onClick="return confirmDeleteLink();">{/if}
45034273 32 <input type="hidden" name="token" value="{$token}">
ae22a12b 33 {if="$http_referer"}<input type="hidden" name="returnurl" value="{$http_referer|htmlspecialchars}">{/if}
45034273
SS
34 </form>
35 </div>
36</div>
37{include="page.footer"}
bdd1715b 38{if="($GLOBALS['config']['OPEN_SHAARLI'] || isLoggedIn())"}
fe16b01e 39<script>
bdd1715b
A
40 $ = Awesomplete.$;
41 new Awesomplete($('input[data-multiple]'), {
42 filter: function(text, input) {
43 return Awesomplete.FILTER_CONTAINS(text, input.match(/[^ ]*$/)[0]);
44 },
45 replace: function(text) {
46 var before = this.input.value.match(/^.+ \s*|/)[0];
47 this.input.value = before + text + " ";
48 },
49 minChars: 1
50 });
246e9b4e
SS
51</script>
52{/if}
45034273 53</body>
ae22a12b 54</html>