Skip to content

Commit

Permalink
Merge pull request #1884 from roadster31/select-hover-color-fix
Browse files Browse the repository at this point in the history
Hover color of bootstrap-select, tax rule page improvement
  • Loading branch information
bibich committed Jan 4, 2016
2 parents 7822fca + 2729af2 commit 1374ca8
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 48 deletions.
2 changes: 1 addition & 1 deletion core/lib/Thelia/Form/TaxCreationForm.php
Expand Up @@ -51,7 +51,7 @@ protected function buildForm($change_mode = false)
}

$this->formBuilder
->add("locale", "text", array(
->add("locale", "hidden", array(
"constraints" => array(new NotBlank()),
))
->add("type", "choice", array(
Expand Down
2 changes: 1 addition & 1 deletion core/lib/Thelia/Form/TaxRuleCreationForm.php
Expand Up @@ -21,7 +21,7 @@ class TaxRuleCreationForm extends BaseForm
protected function buildForm($change_mode = false)
{
$this->formBuilder
->add("locale", "text", array(
->add("locale", "hidden", array(
"constraints" => array(new NotBlank()),
))
;
Expand Down
2 changes: 1 addition & 1 deletion templates/backOffice/default/assets/css/styles.css

Large diffs are not rendered by default.

Expand Up @@ -134,7 +134,7 @@
color: @input-color;

&:hover{
color: #FFF;
color: #000;
}
}

Expand Down
91 changes: 47 additions & 44 deletions templates/backOffice/default/taxes-rules.html
Expand Up @@ -77,7 +77,14 @@
{loop type="tax" name="taxes" backend_context="1"}

<tr>
<td>{$TITLE}</td>
<td>
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
<a title="{intl l='Change this tax'}" href="{url path="/admin/configuration/taxes/update/%id" id=$ID}">{$TITLE}</span></a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td>{$DESCRIPTION}</td>
<td class="actions">
<div class="btn-toolbar btn toolbar-primary">
Expand Down Expand Up @@ -117,7 +124,7 @@
<tr>
<th class="col-md-3">{intl l="Name"}</th>
<th class="col-md-4">{intl l="Description"}</th>
<th class="col-md-1">{intl l="Default"}</th>
<th class="col-md-1 text-center">{intl l="Default"}</th>
<th class="col-md-1">{intl l="Actions"}</th>
</tr>
</thead>
Expand All @@ -126,11 +133,18 @@
{loop type="tax-rule" name="taxes-rules" backend_context="1"}

<tr>
<td>{$TITLE}</td>
<td>{$DESCRIPTION}</td>
<td>
{loop type="auth" name="can_change-tr" role="ADMIN" resource="admin.configuration.tax" access="UPDATE"}
<a title="{intl l='Change this tax rule'}" href="{url path="/admin/configuration/taxes_rules/update/%id" id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change-tr"}
{$TITLE}
{/elseloop}
</td>
<td>{$DESCRIPTION}</td>
<td class="text-center">
{if $IS_DEFAULT == 1}
<span class="glyphicon glyphicon-ok"></span>
<span class="glyphicon glyphicon-star"></span>
{/if}
</td>
<td class="actions">
Expand Down Expand Up @@ -176,29 +190,23 @@
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "tax_create_dialog"}

{form_hidden_fields}

{form_field field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{form_hidden_fields exclude="locale"}

{form_field field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{if $form_error}{$value}{else}{if $IS_TRANSLATED == 1}{$TITLE}{/if}{/if}">
</div>
{/form_field}
{custom_render_form_field field="title"}
{loop type="lang" name="default-lang" default_only="1"}
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />

{form_field field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :
<span class="label-help-block">{intl l="The detailed description."}</span>
</label>
{form_field field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}

<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{if $form_error}{$value}{else}{if $IS_TRANSLATED == 1}{$DESCRIPTION}{/if}{/if}</textarea>
</div>
{/form_field}
<div class="input-group">
<input type="text" {form_field_attributes field="title"}>
<span class="input-group-addon"><img src="{image file="assets/img/flags/`$CODE`.png"}" alt="{$TITLE}" /></span>
</div>
{/loop}
{/custom_render_form_field}

{form_field field='type'}
<div class="form-group {if $error}has-error{/if}">
Expand Down Expand Up @@ -291,31 +299,26 @@
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "tax_rule_create_dialog"}

{form_hidden_fields}

{form_field field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{form_hidden_fields exclude="locale"}

{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}

{form_field field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{if $error}{$value}{/if}">
</div>
{/form_field}
{custom_render_form_field field="title"}
{loop type="lang" name="default-lang" default_only="1"}
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />

{form_field field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{$label} :
<span class="label-help-block">{intl l="The detailed description."}</span>
</label>
{form_field field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}

<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{if $error}{$value}{/if}</textarea>
<div class="input-group">
<input type="text" {form_field_attributes field="title"}>
<span class="input-group-addon"><img src="{image file="assets/img/flags/`$CODE`.png"}" alt="{$TITLE}" /></span>
</div>
{/form_field}
{/loop}
{/custom_render_form_field}

{hook name="tax-rule.create-form" location="tax_rule_create_form" }
{/capture}

Expand Down

0 comments on commit 1374ca8

Please sign in to comment.