Пример #1
0
<?php

include_once './partials/htmlOpen.php';
?>

	<h1>Form Templates</h1>
	<h2>Sign In Form</h2>

<?php 
echo SAMUIKit\FormTemplates::signInForm(['textInputs' => [['label' => 'Email address', 'type' => 'email', 'name' => 'email', 'required' => true], ['label' => 'Password', 'type' => 'password', 'name' => 'password', 'required' => true]], 'createPath' => '/path/to/create/account', 'forgotLinks' => ['/forgot/username' => 'Forgot username', '/forgot/password' => 'Forgot password'], 'showPasswordOnClick' => 'ShowPasswordMethod']);
include_once './partials/htmlClose.php';
?>
	
Пример #2
0
    'name' => 'checkbox',
    'options' => [
        'check_1' => 'Option 1',
        'check_2' => 'Option 2',
        'check_3' => 'Option 3',
        'check_4' => 'Option 4',
        'check_5' => 'Option 5'
    ],
    'required' => true,
    'hint' => 'The hint for the form control.',
    'errorMessage' => 'This form control has errors',
    'selected' => [
        'check_1',
        'check_3',
        'check_4'
    ]
]);
</pre>
</code>		

<h3>SAMUIKit Code Sample</h3>
<form class="usa-form-large">
<?php 
echo SAMUIKit\FormTemplates::addressForm(['label' => 'Mailing address', 'name' => 'mailing-address']);
?>
</form>
<?php 
include_once './partials/htmlClose.php';
?>

Пример #3
0
<p><i>Big w/ all keys</i></p>
<?php 
echo SAMUIKit\Navigation::footer(['type' => 'big', 'logo' => ['path' => '/img/logo-img.png', 'alt' => 'Alternative description of logo'], 'name' => 'Name of Agency', 'number' => '(800) CALL-GOVT', 'email' => '*****@*****.**', 'social' => ['facebook' => '/facebook', 'twitter' => '/twitter', 'youtube' => '/youtube', 'rss' => '/rss'], 'signUpTarget' => '/sign-up-target', 'sections' => [['title' => 'Topic', 'links' => ['/1' => 'Secondary link', '/2' => 'Secondary link', '/3' => 'Secondary link', '/4' => 'Secondary link']], ['title' => 'Topic', 'links' => ['/1' => 'Secondary link', '/2' => 'Secondary link', '/3' => 'Secondary link', '/4' => 'Secondary link']], ['title' => 'Topic', 'links' => ['/1' => 'Secondary link', '/2' => 'Secondary link', '/3' => 'Secondary link', '/4' => 'Secondary link']], ['title' => 'Topic', 'links' => ['/1' => 'Secondary link', '/2' => 'Secondary link', '/3' => 'Secondary link', '/4' => 'Secondary link']], ['title' => 'Not displayed', 'links' => ['/1' => 'Secondary link', '/2' => 'Secondary link', '/3' => 'Secondary link', '/4' => 'Secondary link']]]]);
?>

<p><strong>SAMUIKit Address Form</strong></p>
<form class="usa-form-large">
<?php 
echo SAMUIKit\FormTemplates::addressForm(['label' => 'Mailing address', 'name' => 'mailing-address']);
?>
</form>

<p><strong>SAMUIKit Name Form</strong></p>
<form class="usa-form-large">
<?php 
echo SAMUIKit\FormTemplates::nameForm(['label' => 'Name', 'name' => 'name']);
?>
</form>

<p><strong>Navigation</strong></p>
<p><i>Single</i></p>
<?php 
echo SAMUIKit\Navigation::sideNavigation(['menu' => [['title' => 'Current page', 'path' => 'current'], ['title' => 'Parent link', 'path' => '#parent1'], ['title' => 'Parent link', 'path' => '#parent2']], 'current' => '/current/']);
?>
<p><i>Child</i></p>
<?php 
echo SAMUIKit\Navigation::sideNavigation(['menu' => [['title' => 'Parent link', 'path' => '#'], ['title' => 'Current page', 'path' => 'current', 'submenu' => [['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => 'child']]], ['title' => 'Parent link', 'path' => '#']], 'current' => '/current/child']);
?>
<p><i>Grandchild</i></p>
<?php 
echo SAMUIKit\Navigation::sideNavigation(['menu' => [['title' => 'Parent link', 'path' => '#'], ['title' => 'Current page', 'path' => 'current', 'submenu' => [['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => 'child', 'submenu' => [['title' => 'Grandchild link', 'path' => '#'], ['title' => 'Grandchild link', 'path' => '#'], ['title' => 'Grandchild link', 'path' => 'grandchild']]], ['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => '#'], ['title' => 'Child link', 'path' => '#']]], ['title' => 'Parent link', 'path' => '#']], 'current' => '/current/child/grandchild']);