Hi,
I had a need to modify Form.ss slightly so that I could wrap the global error/notification message in a <span>. This is intended to be used for front-end forms only.
However when I did this, it seemed to break the CMS admin interface. Rather than use the appropriate template eg. CMSMain_EditForm.ss it was picking up my (overridden) version of Form.ss located in mysite/templates.
Is this expected behaviour? Why does an overridden Form.ss take precedence over more specific templates such as CMSMain_EditForm.ss? Is there another way of achieving the simple thing I'm trying to do of wrapping the global error message text in a <span>.
This is the overridden Form.ss
<% if $IncludeFormTag %>
<form $AttributesHTML>
<% end_if %>
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType"><span>$Message</span></p>
<% else %>
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
<% end_if %>
<fieldset class="thisistheone">
<% if $Legend %><legend>$Legend</legend><% end_if %>
<% loop $Fields %>
$FieldHolder
<% end_loop %>
<div class="clear"><!-- --></div>
</fieldset>
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>
$Field
<% end_loop %>
</div>
<% end_if %>
<% if $IncludeFormTag %>
</form>
<% end_if %>
Thank you.
VWD.