| 1 | package Strehler::FormFu::Element::Tags; | ||
| 2 | 5 | $Strehler::FormFu::Element::Tags::VERSION = '1.6.8'; | |
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | extends 'HTML::FormFu::Element::Block'; | |
| 7 | |||
| 8 | 18 | ▶ | after BUILD => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 9 | 18 | my $self = shift; | |
| 10 | 18 | $self->tag("div"); | |
| 11 | 18 | $self->id("tags-place"); | |
| 12 | 18 | return; | |
| 13 | 5 | }; | |
| 14 | |||
| 15 | =encoding utf8 | ||
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | Strehler::FormFu::Element::Tags - FormFu Element for Strehler tags field. | ||
| 20 | |||
| 21 | =head1 DESCRIPTION | ||
| 22 | |||
| 23 | A FormFu element to encapsulate all the frontend logic for tags field. It's just a Block element with tag and id hardcoded in it. | ||
| 24 | Tags field needs to be identified in a clear way and needs a fixed structure because it has to interact with Strehler javascript library. | ||
| 25 | |||
| 26 | This element hasn't the standard HTML::FormFu elements namespace because it makes sense only in a Strehler system. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | In article form: | ||
| 31 | |||
| 32 | - type: "+Strehler::FormFu::Element::Tags" | ||
| 33 | |||
| 34 | No parameters, no labels. | ||
| 35 | |||
| 36 | =head1 GENERATED HTML | ||
| 37 | |||
| 38 | <div id="tags-place"><label for="tags">Tags</label> | ||
| 39 | <input type="text" name="tags"> | ||
| 40 | </div> | ||
| 41 | |||
| 42 | =head1 YAML CONFIGURATION | ||
| 43 | |||
| 44 | - type: Block | ||
| 45 | tag: div | ||
| 46 | id: tags-place | ||
| 47 | |||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 5 | 1; | |
| 52 | |||