2013-11-15 22:55:32 +00:00
|
|
|
title: $:/core/ui/EditTemplate/fields
|
|
|
|
tags: $:/tags/EditTemplate
|
2013-06-08 16:34:51 +00:00
|
|
|
|
2014-02-16 09:46:43 +00:00
|
|
|
\define lingo-base() $:/language/EditTemplate/
|
2014-08-01 16:03:53 +00:00
|
|
|
\define config-title()
|
|
|
|
$:/config/EditTemplateFields/Visibility/$(currentField)$
|
|
|
|
\end
|
2014-12-04 09:39:14 +00:00
|
|
|
|
2014-08-10 08:13:56 +00:00
|
|
|
\define config-filter()
|
|
|
|
[[hide]] -[title{$(config-title)$}]
|
|
|
|
\end
|
2014-12-04 09:39:14 +00:00
|
|
|
|
2015-04-03 08:06:57 +00:00
|
|
|
\define new-field-inner()
|
|
|
|
<$reveal type="nomatch" text="" default=<<name>>>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$button>
|
2015-05-18 21:16:04 +00:00
|
|
|
<$action-sendmessage $message="tm-add-field" $name=<<name>> $value=<<value>>/>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
|
|
|
|
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
|
|
|
|
<<lingo Fields/Add/Button>>
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
2015-04-03 08:06:57 +00:00
|
|
|
<$reveal type="match" text="" default=<<name>>>
|
2014-12-04 09:39:14 +00:00
|
|
|
<$button>
|
|
|
|
<<lingo Fields/Add/Button>>
|
|
|
|
</$button>
|
|
|
|
</$reveal>
|
|
|
|
\end
|
|
|
|
|
2015-04-03 08:06:57 +00:00
|
|
|
\define new-field()
|
|
|
|
<$set name="name" value={{$:/temp/newfieldname}}>
|
|
|
|
<$set name="value" value={{$:/temp/newfieldvalue}}>
|
|
|
|
<<new-field-inner>>
|
|
|
|
</$set>
|
|
|
|
</$set>
|
|
|
|
\end
|
|
|
|
|
2014-08-28 17:47:21 +00:00
|
|
|
<div class="tc-edit-fields">
|
|
|
|
<table class="tc-edit-fields">
|
2014-04-06 21:49:59 +00:00
|
|
|
<tbody>
|
2014-08-01 16:03:53 +00:00
|
|
|
<$list filter="[all[current]fields[]] +[sort[title]]" variable="currentField">
|
2014-08-10 08:13:56 +00:00
|
|
|
<$list filter=<<config-filter>> variable="temp">
|
2014-08-28 17:47:21 +00:00
|
|
|
<tr class="tc-edit-field">
|
|
|
|
<td class="tc-edit-field-name">
|
2014-04-06 21:49:59 +00:00
|
|
|
<$text text=<<currentField>>/>:</td>
|
2014-08-28 17:47:21 +00:00
|
|
|
<td class="tc-edit-field-value">
|
2014-04-06 21:49:59 +00:00
|
|
|
<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/>
|
|
|
|
</td>
|
2014-08-28 17:47:21 +00:00
|
|
|
<td class="tc-edit-field-remove">
|
2014-11-07 21:15:21 +00:00
|
|
|
<$button class="tc-btn-invisible" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}>
|
2014-11-06 18:32:11 +00:00
|
|
|
<$action-deletefield $field=<<currentField>>/>
|
|
|
|
{{$:/core/images/delete-button}}
|
|
|
|
</$button>
|
2014-04-06 21:49:59 +00:00
|
|
|
</td>
|
2013-10-21 22:10:20 +00:00
|
|
|
</tr>
|
2014-08-10 08:13:56 +00:00
|
|
|
</$list>
|
2013-10-21 22:10:20 +00:00
|
|
|
</$list>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-06-08 16:34:51 +00:00
|
|
|
</div>
|
|
|
|
|
2014-12-04 09:39:14 +00:00
|
|
|
<$fieldmangler>
|
2014-08-28 17:47:21 +00:00
|
|
|
<div class="tc-edit-field-add">
|
|
|
|
<em class="tc-edit">
|
2014-04-06 21:49:59 +00:00
|
|
|
<<lingo Fields/Add/Prompt>>
|
2014-11-06 18:24:33 +00:00
|
|
|
</em>
|
|
|
|
<span class="tc-edit-field-add-name">
|
2014-08-28 17:47:21 +00:00
|
|
|
<$edit-text tiddler="$:/temp/newfieldname" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} class="tc-edit-texteditor"/>
|
2014-11-06 18:24:33 +00:00
|
|
|
</span>
|
|
|
|
<span class="tc-edit-field-add-value">
|
|
|
|
<$edit-text tiddler="$:/temp/newfieldvalue" tag="input" default="" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class="tc-edit-texteditor"/>
|
|
|
|
</span>
|
|
|
|
<span class="tc-edit-field-add-button">
|
2015-04-03 08:06:57 +00:00
|
|
|
<$macrocall $name="new-field"/>
|
2014-04-06 21:49:59 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
2014-12-04 09:39:14 +00:00
|
|
|
</$fieldmangler>
|
|
|
|
|