tags: $:/tags/EditTemplate
title: $:/core/ui/EditTemplate/title

\whitespace trim
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes" dir={{$:/config/DefaultTextDirection}}/>

<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">

<$list filter="[all[current]regexp:draft.title<pattern>]" variable="listItem">

<div class="tc-message-box" dir={{$:/config/DefaultTextDirection}}>

{{$:/core/images/warning}}&#32;{{$:/language/EditTemplate/Title/BadCharacterWarning}}

</div>

</$list>

</$vars>

<$reveal state="!!draft.title" type="nomatch" text={{!!draft.of}} tag="div" dir={{$:/config/DefaultTextDirection}}>

<$list filter="[{!!draft.title}!is[missing]]" variable="listItem">

<div class="tc-message-box">

{{$:/core/images/warning}}&#32;{{$:/language/EditTemplate/Title/Exists/Prompt}}:&#32;<$link to={{!!draft.title}} />

</div>

</$list>

<$list filter="[{!!draft.of}!is[missing]]" variable="listItem">

<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>

<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no">&#32;{{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>

<$tiddler tiddler=<<fromTitle>> >

<$list filter="[relink:wouldchange<toTitle>limit[1]]" variable="listItem">

<$vars stateTiddler=<<qualify "$:/state/edit/references">> >

<$set
	name="prompt"
	filter="[relink:wouldchange<toTitle>relink:impossible<toTitle>]"
	value="EditTemplate/Title/Impossibles/Prompt"
	emptyValue="EditTemplate/Title/References/Prompt" >
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">
{{$:/core/images/right-arrow}}
&#32;
<$macrocall $name=lingo title=<<prompt>> />
</$button>
</$reveal>
<$reveal type="match" state=<<stateTiddler>> text="show">
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">
{{$:/core/images/down-arrow}}
&#32;
<$macrocall $name=lingo title=<<prompt>> />
</$button>
</$reveal>
</$set>

<$reveal type="match" state=<<stateTiddler>> text="show">
<$list variable="listItem" filter="[relink:wouldchange<toTitle>!title[$:/StoryList]sort[title]]" template="$:/plugins/flibbles/relink/ui/ListItemTemplate">
</$list>
</$reveal>

</$vars>

</$list>

</$tiddler>

</$vars>

</$list>

</$reveal>
