Skip to content

Commit

Permalink
Updated naming
Browse files Browse the repository at this point in the history
  • Loading branch information
zuk3975 committed Apr 11, 2019
1 parent 5bfe1a9 commit ca4f1f0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ menuTitle: CategoryChoiceTreeType
weight: 2
---

### CategoryChoiceTreeType
# CategoryChoiceTreeType

CategoryChoiceTreeType is a child of [MeterialChoiceTreeType](meterial-choice-tree), it extends parent options
with options listed bellow. It is used to display category tree selection box and requires
Javascript components.

#### Custom options
## Type options

| Option | Type | Default value | Description |
|:-------------|:-------|:----------------------------------|:------------------------------------------------------------------------------------------|
Expand All @@ -19,12 +19,12 @@ Javascript components.
| choice_value | string | 'id_category' | An array key which should be targeted in provided choices list to get the value for input |


#### Required Javascript components
## Required Javascript components
| Component | Description |
|:----------------------------------------------------------------|:-------------------------------------------------------------------|
| ../admin-dev/themes/new-theme/js/components/form/choice-tree.js | Responsible for choice tree expanding and collapsing interactivity |

#### Code example
## Code example

```php
<?php
Expand All @@ -50,6 +50,6 @@ class CustomType extends AbstractType
}
```

#### Preview example
## Preview example

{{< figure src="../img/category_choice_tree.png" title="CategoryChoiceTree rendered in form example" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ menuTitle: ChangePasswordType
weight: 2
---

### ChangePasswordType
# ChangePasswordType

ChangePasswordType is used to create form for changing password and has a built-in new password generator which requires Javascript components.

#### Required Javascript components
## Required Javascript components
| Component | Description |
|:----------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------|
| ../admin-dev/themes/new-theme/js/components/form/change-password-control.js | Generates random passwords, validates new password and it's confirmation, displays error messages related to validation |

#### Code example
## Code example

```php
<?php
Expand All @@ -33,6 +33,6 @@ class CustomType extends AbstractType
}
```

#### Preview example
## Preview example

{{< figure src="../img/change_password.png" title="ChangePasswordType rendered in form example" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ menuTitle: CountryChoiceType
weight: 2
---

### CountryChoiceType
# CountryChoiceType

CountryChoiceType is a child of
[ChoiceType](https://symfony.com/doc/current/reference/forms/types/choice.html).
It is used to display countries selection box and by default comes with
a list of countries from PrestaShop database.

#### Custom options
## Type options

| Option | Type | Default value | Description | |
|:--------|:------|:---------------------------------|:----------------------------------------------------------------------------------------------------|:---|
| choices | array | Array of all available countries | Choice list that is passed to parent 'choices'. Array should be formatted in `name => value` pairs. | |

#### Code example
## Required Javascript components

None.

## Code example

```php
<?php
Expand All @@ -35,6 +39,6 @@ class CustomType extends AbstractType
}
```

#### Preview example
## Preview example

{{< figure src="../img/country_choice.png" title="CountryChoiceType rendered in form example" >}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ menuTitle: DatePickerType
weight: 2
---

### DatePickerType
# DatePickerType

DatePickerType creates a field with a date picker. It uses Javascript,
but doesn't require any specific components, as it's already enabled globally.

#### Custom options
## Custom options

none

#### Javascript components
## Required Javascript components

none
None.

#### Code example
## Code example

```php
<?php
Expand All @@ -38,7 +38,7 @@ class CustomType extends AbstractType
}
```

#### Preview example
## Preview example

{{< figure src="../img/date-picker.png" title="DatePickerType rendered in form example" >}}

Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ menuTitle: DateRangeType
weight: 2
---

### DateRangeType
# DateRangeType

DateRangeType combines two [DatePickers](../date-picker) to create date range picker. It uses Javascript,
but doesn't require any specific components, as it's already enabled globally.

#### Custom options
## Custom options

none

#### Javascript components
## Required Javascript components

none
None.

#### Code example
## Code example

```php
<?php
Expand All @@ -38,6 +38,6 @@ class CustomType extends AbstractType
}
```

#### Preview example
## Preview example

{{< figure src="../img/date-range.png" title="DateRangeType rendered in form example" >}}

0 comments on commit ca4f1f0

Please sign in to comment.