mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
FIX: WAVE updates
This commit is contained in:
parent
a8218b8082
commit
bc7fea884a
@ -11,10 +11,16 @@ use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class CompositeFieldExtension extends CompositeField
|
||||
{
|
||||
public function extraClass()
|
||||
{
|
||||
return 'composite '.parent::extraClass();
|
||||
}
|
||||
|
||||
public function getAttributes()
|
||||
{
|
||||
$attrs = parent::getAttributes();
|
||||
unset($attrs['name'], $attrs['type'], $attrs['disabled'], $attrs['readonly'], $attrs['autofocus']);
|
||||
|
||||
return $attrs;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
<$Tag $AttributesHTML>
|
||||
<% if $Tag == 'fieldset' && $Legend %>
|
||||
<legend>$Legend</legend>
|
||||
<% end_if %>
|
||||
|
||||
$Field
|
||||
</$Tag>
|
16
app/templates/SilverStripe/Forms/FormField_holder.ss
Normal file
16
app/templates/SilverStripe/Forms/FormField_holder.ss
Normal file
@ -0,0 +1,16 @@
|
||||
<div id="$HolderID" class="field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><label class="left" for="$ID">$Title</label><% end_if %>
|
||||
|
||||
<div class="middleColumn">
|
||||
$Field
|
||||
</div>
|
||||
|
||||
<% if $Title && $RightTitle %>
|
||||
<div class="right">$RightTitle</div>
|
||||
<% else_if $RightTitle %>
|
||||
<label class="right" for="$ID">$RightTitle</label>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="description">$Description</span><% end_if %>
|
||||
</div>
|
27
app/templates/SilverStripe/Forms/Includes/Form.ss
Normal file
27
app/templates/SilverStripe/Forms/Includes/Form.ss
Normal file
@ -0,0 +1,27 @@
|
||||
<% if $IncludeFormTag %>
|
||||
<form $AttributesHTML>
|
||||
<% end_if %>
|
||||
<% if $Message %>
|
||||
<p id="{$FormName}_error" class="message $MessageType">$Message.RAW</p>
|
||||
<% else %>
|
||||
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
|
||||
<% end_if %>
|
||||
|
||||
<fieldset>
|
||||
<% if $Legend %><legend>$Legend</legend><% end_if %>
|
||||
<% loop $Fields %>
|
||||
$FieldHolder
|
||||
<% end_loop %>
|
||||
<div class="clear"><!-- --></div>
|
||||
</fieldset>
|
||||
|
||||
<% if $Actions %>
|
||||
<div class="btn-toolbar">
|
||||
<% loop $Actions %>
|
||||
$Field
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% if $IncludeFormTag %>
|
||||
</form>
|
||||
<% end_if %>
|
@ -0,0 +1,9 @@
|
||||
<div id="$HolderID" class="field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><div class="left">$Title</div><% end_if %>
|
||||
<div class="middleColumn">
|
||||
$Field
|
||||
</div>
|
||||
<% if $RightTitle %><div class="right">$RightTitle</div><% end_if %>
|
||||
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="description">$Description</span><% end_if %>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<img src="$Image.Fill(432,324).URL" alt="$Title" />
|
||||
<img src="$Image.Fill(432,315).URL" alt="$Title" />
|
||||
<% if $Link %>
|
||||
<% with $Link %>
|
||||
<a href="$URL"<% if $OpenInNewWindow %> target="_blank"<% end_if %> class="stretched-link">
|
||||
|
Loading…
Reference in New Issue
Block a user