Skip to content

Commit

Permalink
update input_array and i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kerin committed Aug 29, 2013
1 parent 65002fb commit ffd226c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/Kohana/Jam/Form/Tart/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,19 +239,19 @@ public function input_array($name, array $options = array(), array $attributes =
foreach ( (array) $self->object()->$name as $index => $value)
{
$h('div.multiform', function($h, $self) use ($attributes, $index, $value) {
$h('input', array('type' => 'text', 'name' => $attributes['name']."[{$index}]", 'value' => $value));
$h('button', array('class' => 'btn', 'data-dismiss' => 'multiform'), 'Remove');
$h('input', array('type' => 'text', 'name' => $attributes['name']."[{$index}]", 'value' => $value, 'class' => Arr::get($attributes, 'class')));
$h('button', array('class' => 'btn', 'data-dismiss' => 'multiform'), __('Remove'));
});
}
$h('a', array('href' => "#{$name}-form", 'class' => 'btn', 'data-multiform-add' => '#'.$attributes['id']), 'Add Rule');
$h('a', array('href' => "#{$name}-form", 'class' => 'btn', 'data-multiform-add' => '#'.$attributes['id']), __('Add'));
$h('fieldset', array('disabled', 'class' => 'hide', 'id' => "{$name}-form"), function($h) use ($attributes) {
$h('input', array('type' => 'text', 'name' => $attributes['name'].'[0]'));
$h('input', array('type' => 'text', 'name' => $attributes['name'].'[0]', 'class' => Arr::get($attributes, 'class')));
$h('button', array('class' => 'btn', 'data-dismiss' => 'multiform'), 'Remove');
});
});
});
}

/**
* A widget to enter a string value for a field, using typeahead.
* If its a model, uses :name_key for that model to dispaly the value
Expand Down
2 changes: 2 additions & 0 deletions i18n/bg.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
'Search' => 'Търсене',
'All' => 'Всички',
'Edit' => 'Редактирай',
'Add' => 'Добави',
'Remove' => 'Премахни',
'Delete' => 'Изтрий',
'Go' => 'Изпълни',
'Go' => 'Изпълни',
Expand Down

0 comments on commit ffd226c

Please sign in to comment.