Skip to content

Commit

Permalink
Merge branch '1.6' of https://github.com/PrestaShop/PrestaShop into 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Augagneur committed Mar 19, 2014
2 parents 2db9a79 + cf09d46 commit 667741a
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 8 deletions.
3 changes: 1 addition & 2 deletions admin-dev/themes/default/template/helpers/form/form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@
$target.html(max-$source.val().length);
});
}
$(document).ready(function(){
countDown($("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"), $("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter"));
});
Expand All @@ -247,7 +246,7 @@
{/if}
{elseif $input.type == 'textbutton'}
{assign var='value_text' value=$fields_value[$input.name]}
<div class="form-group">
<div class="row">
<div class="col-lg-9">
{if isset($input.maxchar)}
<div class="input-group">
Expand Down
81 changes: 75 additions & 6 deletions controllers/admin/AdminPatternsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public function viewAccess()

public function renderForm()
{

$this->fields_value = array(
'type_text' => 'with value',
'type_text_readonly' => 'with value that you can\'t edit'
);

$this->fields_form = array(
'legend' => array(
'title' => $this->l('patterns of helper form.tpl'),
Expand Down Expand Up @@ -96,28 +102,91 @@ public function renderForm()
'name' => 'type_text_maxchar',
'maxchar' => 30
),
array(
'type' => 'text',
'label' => $this->l('input text with suffix'),
'name' => 'type_text_maxchar'
),
array(
'type' => 'text',
'lang' => true,
'label' => $this->l('input text multilang'),
'name' => 'type_text_maxchar'
'name' => 'type_text_multilang'
),
array(
'type' => 'text',
'label' => $this->l('input readonly'),
'readonly' => true,
'name' => 'type_text_readonly'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-xs'),
'name' => 'type_text_xs',
'class' => 'input fixed-width-xs'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-sm'),
'name' => 'type_text_sm',
'class' => 'input fixed-width-sm'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-md'),
'name' => 'type_text_md',
'class' => 'input fixed-width-md'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-lg'),
'name' => 'type_text_lg',
'class' => 'input fixed-width-lg'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-xl'),
'name' => 'type_text_xl',
'class' => 'input fixed-width-xl'
),
array(
'type' => 'text',
'label' => $this->l('input fixed-width-xxl'),
'name' => 'type_text_xxl',
'class' => 'fixed-width-xxl'
),
array(
'type' => 'tags',
'label' => $this->l('input tags'),
'name' => 'type_text_tags'
),
array(
'type' => 'textbutton',
'label' => $this->l('input with button'),
'name' => 'type_textbutton',
'button' => array(
'label' => $this->l('do something'),
'attributes' => array(
'onclick' => 'alert(\'something done\');'
)
)
),
array(
'type' => 'select',
'label' => $this->l('select'),
'name' => 'type_select',
'options' => array(
'query' => Zone::getZones(),
'id' => 'id_zone',
'name' => 'name'
),
),
array(
'type' => 'select',
'label' => $this->l('select with chosen'),
'name' => 'type_select_chosen',
'class' => 'chosen',
'options' => array(
'query' => Country::getCountries((int)Context::getContext()->cookie->id_lang),
'id' => 'id_zone',
'name' => 'name'
),
),
),
'submit' => array(
'title' => $this->l('Save'),
Expand Down

0 comments on commit 667741a

Please sign in to comment.