Skip to content

Commit

Permalink
Merge pull request #18 from govau/Commenting
Browse files Browse the repository at this point in the history
Template updates
  • Loading branch information
Jesse Boyd authored Aug 17, 2018
2 parents 1ed542e + 51cf21b commit b505ae1
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/form/input--email.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{#
/**
* @file
* Theme override for an 'input' #type form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_input()
*/
/**
* @TODO: Add templating to add the correct classes via a preprocess function.
* They need to be based on the eventual output of this, such as a button
* (.au-btn), or a text field (.au-text-input).
#}

{% set classes=['au-text-input',] %}

<input{{ attributes.addClass(classes) }} />{{ children }}
20 changes: 20 additions & 0 deletions templates/form/input--url.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{#
/**
* @file
* Theme override for an 'input' #type form element.
*
* Available variables:
* - attributes: A list of HTML attributes for the input element.
* - children: Optional additional rendered elements.
*
* @see template_preprocess_input()
*/
/**
* @TODO: Add templating to add the correct classes via a preprocess function.
* They need to be based on the eventual output of this, such as a button
* (.au-btn), or a text field (.au-text-input).
#}

{% set classes=['au-text-input',] %}

<input{{ attributes.addClass(classes) }} />{{ children }}
21 changes: 21 additions & 0 deletions templates/form/textarea.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{#
/**
* @file
* Theme override for a 'textarea' #type form element.
*
* Available variables
* - wrapper_attributes: A list of HTML attributes for the wrapper element.
* - attributes: A list of HTML attributes for the textarea element.
* - resizable: An indicator for whether the textarea is resizable.
* - required: An indicator for whether the textarea is required.
* - value: The textarea content.
*
* @see template_preprocess_textarea()
*/
#}

{% set classes = ['au-text-input', 'au-text-input--block'] %}

<div{{ wrapper_attributes }}>
<textarea{{ attributes.addClass(classes) }}>{{ value }}</textarea>
</div>

0 comments on commit b505ae1

Please sign in to comment.