diff options
Diffstat (limited to 'tpl/default/editlink.html')
-rw-r--r-- | tpl/default/editlink.html | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html index d16059a3..83e541fd 100644 --- a/tpl/default/editlink.html +++ b/tpl/default/editlink.html | |||
@@ -1,3 +1,4 @@ | |||
1 | {if="empty($batch_mode)"} | ||
1 | <!DOCTYPE html> | 2 | <!DOCTYPE html> |
2 | <html{if="$language !== 'auto'"} lang="{$language}"{/if}> | 3 | <html{if="$language !== 'auto'"} lang="{$language}"{/if}> |
3 | <head> | 4 | <head> |
@@ -5,9 +6,19 @@ | |||
5 | </head> | 6 | </head> |
6 | <body> | 7 | <body> |
7 | {include="page.header"} | 8 | {include="page.header"} |
9 | {else} | ||
10 | {ignore}Lil hack: when included in a loop in batch mode, `$value` is assigned by RainTPL with template vars.{/ignore} | ||
11 | {function="extract($value) ? '' : ''"} | ||
12 | {/if} | ||
8 | <div id="editlinkform" class="edit-link-container" class="pure-g"> | 13 | <div id="editlinkform" class="edit-link-container" class="pure-g"> |
9 | <div class="pure-u-lg-1-5 pure-u-1-24"></div> | 14 | <div class="pure-u-lg-1-5 pure-u-1-24"></div> |
10 | <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light"> | 15 | <form method="post" |
16 | name="linkform" | ||
17 | action="{$base_path}/admin/shaare" | ||
18 | class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light" | ||
19 | > | ||
20 | {$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-input' : ''} | ||
21 | |||
11 | <h2 class="window-title"> | 22 | <h2 class="window-title"> |
12 | {if="!$link_is_new"}{'Edit Shaare'|t}{else}{'New Shaare'|t}{/if} | 23 | {if="!$link_is_new"}{'Edit Shaare'|t}{else}{'New Shaare'|t}{/if} |
13 | </h2> | 24 | </h2> |
@@ -24,26 +35,37 @@ | |||
24 | <div> | 35 | <div> |
25 | <label for="lf_title">{'Title'|t}</label> | 36 | <label for="lf_title">{'Title'|t}</label> |
26 | </div> | 37 | </div> |
27 | <div> | 38 | <div class="{$asyncLoadClass}"> |
28 | <input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input autofocus"> | 39 | <input type="text" name="lf_title" id="lf_title" value="{$link.title}" |
40 | class="lf_input {if="!$async_metadata"}autofocus{/if}" | ||
41 | > | ||
42 | <div class="icon-container"> | ||
43 | <i class="loader"></i> | ||
44 | </div> | ||
29 | </div> | 45 | </div> |
30 | <div> | 46 | <div> |
31 | <label for="lf_description">{'Description'|t}</label> | 47 | <label for="lf_description">{'Description'|t}</label> |
32 | </div> | 48 | </div> |
33 | <div> | 49 | <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}"> |
34 | <textarea name="lf_description" id="lf_description" class="autofocus">{$link.description}</textarea> | 50 | <textarea name="lf_description" id="lf_description" class="autofocus">{$link.description}</textarea> |
51 | <div class="icon-container"> | ||
52 | <i class="loader"></i> | ||
53 | </div> | ||
35 | </div> | 54 | </div> |
36 | <div> | 55 | <div> |
37 | <label for="lf_tags">{'Tags'|t}</label> | 56 | <label for="lf_tags">{'Tags'|t}</label> |
38 | </div> | 57 | </div> |
39 | <div> | 58 | <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}"> |
40 | <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input autofocus" | 59 | <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input autofocus" |
41 | data-list="{loop="$tags"}{$key}, {/loop}" data-multiple data-autofirst autocomplete="off" > | 60 | data-list="{loop="$tags"}{$key}, {/loop}" data-multiple data-autofirst autocomplete="off" > |
61 | <div class="icon-container"> | ||
62 | <i class="loader"></i> | ||
63 | </div> | ||
42 | </div> | 64 | </div> |
43 | 65 | ||
44 | <div> | 66 | <div> |
45 | <input type="checkbox" name="lf_private" id="lf_private" | 67 | <input type="checkbox" name="lf_private" id="lf_private" |
46 | {if="($link_is_new && $default_private_links || $link.private == true)"} | 68 | {if="$link.private === true"} |
47 | checked="checked" | 69 | checked="checked" |
48 | {/if}> | 70 | {/if}> |
49 | <label for="lf_private">{'Private'|t}</label> | 71 | <label for="lf_private">{'Private'|t}</label> |
@@ -66,10 +88,17 @@ | |||
66 | 88 | ||
67 | 89 | ||
68 | <div class="submit-buttons center"> | 90 | <div class="submit-buttons center"> |
91 | {if="!empty($batch_mode)"} | ||
92 | <a href="#" class="button button-grey" name="cancel-batch-link" | ||
93 | title="{'Remove this bookmark from batch creation/modification.'}" | ||
94 | > | ||
95 | {'Cancel'|t} | ||
96 | </a> | ||
97 | {/if} | ||
69 | <input type="submit" name="save_edit" class="" id="button-save-edit" | 98 | <input type="submit" name="save_edit" class="" id="button-save-edit" |
70 | value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}"> | 99 | value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}"> |
71 | {if="!$link_is_new"} | 100 | {if="!$link_is_new"} |
72 | <a href="?delete_link&lf_linkdate={$link.id}&token={$token}" | 101 | <a href="{$base_path}/admin/shaare/delete?id={$link.id}&token={$token}" |
73 | title="" name="delete_link" class="button button-red confirm-delete"> | 102 | title="" name="delete_link" class="button button-red confirm-delete"> |
74 | {'Delete'|t} | 103 | {'Delete'|t} |
75 | </a> | 104 | </a> |
@@ -77,11 +106,16 @@ | |||
77 | </div> | 106 | </div> |
78 | 107 | ||
79 | <input type="hidden" name="token" value="{$token}"> | 108 | <input type="hidden" name="token" value="{$token}"> |
109 | <input type="hidden" name="source" value="{$source}"> | ||
80 | {if="$http_referer"} | 110 | {if="$http_referer"} |
81 | <input type="hidden" name="returnurl" value="{$http_referer}"> | 111 | <input type="hidden" name="returnurl" value="{$http_referer}"> |
82 | {/if} | 112 | {/if} |
83 | </form> | 113 | </form> |
84 | </div> | 114 | </div> |
115 | |||
116 | {if="empty($batch_mode)"} | ||
85 | {include="page.footer"} | 117 | {include="page.footer"} |
118 | {if="$link_is_new && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if} | ||
86 | </body> | 119 | </body> |
87 | </html> | 120 | </html> |
121 | {/if} | ||