Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hibberd committed Mar 5, 2015
1 parent 0a2e426 commit 1b3a4c9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,16 @@ Each link returns a link object which contains the following:
* Force download option
* Rework the way link data is returned
* Improve handling of target stuff - if it's required
* More Validation Options


## Changelog

### 0.9.1

* Fixed: Input field not displaying correctly when set to single type when field had previously been saved.
* Fixed: Custom text returning false.

### 0.9

* Added: Removed the requirement to use the |raw filter when using the link variable.
Expand Down
2 changes: 1 addition & 1 deletion linkit/LinkitPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function getName()

public function getVersion()
{
return '0.9';
return '0.9.1';
}

public function getDeveloper()
Expand Down
28 changes: 14 additions & 14 deletions linkit/templates/_fieldtype/input.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{% import "_includes/forms" as forms %}

{% set type = value.type is defined and value.type ? value.type : ( isSingleType ? isSingleType : null ) %}
{% set type = isSingleType ? isSingleType : ( value.type is defined and value.type ? value.type : null) %}

<div class="linkit">

<input type="hidden" name="{{ name }}" value="" />

{% if not isSingleType %}
<div class="linkit-type">
{{ forms.selectField({
id: name~'-Type',
class: name~'-Type',
name: name~'[type]',
options: types,
value: type ? type
}) }}
</div>
<div class="linkit-options{{ type is not defined or type == '' ? ' hidden' }}">

{% if isSingleType %}
<input type="hidden" id="{{ name }}Type" name="{{ name }}[type]" value="{{ type }}" />
{% else %}
<div class="linkit-type">
{{ forms.selectField({
id: name~'-Type',
class: name~'-Type',
name: name~'[type]',
options: types,
value: type ? type
}) }}
</div>
<div class="linkit-options{{ type is not defined or type == '' ? ' hidden' }}">
{% endif %}


{% if types.email is defined %}
<div class="linkit-type-option linkit-email{{ type != 'email' ? ' hidden' }}">
Expand Down

0 comments on commit 1b3a4c9

Please sign in to comment.