<?php
$val .= '<div class="flexbox-area-grow cms-content ';

$val .= $scope->locally()->XML_val('BaseCSSClasses', null, true);
$val .= '" data-layout-type="border" data-pjax-fragment="Content">
	';

$scope->locally()->obj('AddForm', null, true); $scope->pushScope();
$val .= '
		<form ';

$val .= $scope->locally()->XML_val('FormAttributes', null, true);
$val .= ' data-layout-type="border">
			<div class="toolbar toolbar--north">
				<div class="toolbar__navigation">
					<ol class="breadcrumb">
						<li class="breadcrumb__item">
                            ';

$val .= _t('SilverStripe\CMS\Controllers\CMSPagesController.MENUTITLE','Pages');
$val .= '
                        </li>
						<li class="breadcrumb__item breadcrumb__item--last breadcrumb__item--no-crumb">
				            <h2 class="breadcrumb__item-title breadcrumb__item-title--last">
						        ';

$val .= _t('SilverStripe\CMS\Controllers\CMSPageAddController.Title','Add page');
$val .= '
				            </h2>
			            </li>
					</ol>
				</div>
			</div>

			<div class="panel panel--padded panel--scrollable flexbox-area-grow">
				';

if ($scope->locally()->hasValue('Message', null, true)) { 
$val .= '
				<p id="';

$val .= $scope->locally()->XML_val('FormName', null, true);
$val .= '_error" class="message ';

$val .= $scope->locally()->XML_val('MessageType', null, true);
$val .= '">';

$val .= $scope->locally()->XML_val('Message', null, true);
$val .= '</p>
				';


}else { 
$val .= '
				<p id="';

$val .= $scope->locally()->XML_val('FormName', null, true);
$val .= '_error" class="message ';

$val .= $scope->locally()->XML_val('MessageType', null, true);
$val .= '" style="display: none"></p>
				';


}
$val .= '

				<fieldset>
					';

if ($scope->locally()->hasValue('Legend', null, true)) { 
$val .= '<legend>';

$val .= $scope->locally()->XML_val('Legend', null, true);
$val .= '</legend>';


}
$val .= '
					';

$scope->locally()->obj('Fields', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
						';

$val .= $scope->locally()->XML_val('FieldHolder', null, true);
$val .= '
					';


}; $scope->popScope(); 
$val .= '
				</fieldset>
			</div>

			<div class="toolbar--south">
				';

if ($scope->locally()->hasValue('Actions', null, true)) { 
$val .= '
				<div class="btn-toolbar">
					';

$scope->locally()->obj('Actions', null, true); $scope->pushScope(); while (($key = $scope->next()) !== false) {
$val .= '
						';

$val .= $scope->locally()->XML_val('Field', null, true);
$val .= '
					';


}; $scope->popScope(); 
$val .= '
				</div>
				';


}
$val .= '
			</div>
		</form>
	';


; $scope->popScope(); 
$val .= '
</div>
';

