Author: Hugo Melo <hugo@riseup.net>
Fix selected hub on consumer page
plugins/suppliers/locales/en-US.yml | 1 plugins/suppliers/locales/pt-BR.yml | 1 plugins/suppliers/public/javascripts/views/consumer-view.tag.slim | 4
diff --git a/plugins/suppliers/locales/en-US.yml b/plugins/suppliers/locales/en-US.yml index ff1a9f70de96f664bbadd2dc298c46e800391a07..c4374bc90fa45cf6ea66f4e5e880ea22272c4ce7 100644 --- a/plugins/suppliers/locales/en-US.yml +++ b/plugins/suppliers/locales/en-US.yml @@ -424,6 +424,7 @@ telephone: Telephone celular: Celular email: Email hub: Hub + choose_one_hub: "Choose one hub" address: Address city: City state: State diff --git a/plugins/suppliers/locales/pt-BR.yml b/plugins/suppliers/locales/pt-BR.yml index a8b15602ebee8efcb57e1edc3fefd23fb35500f9..bdd4746469722c06a25130225728ec62aaf4180a 100644 --- a/plugins/suppliers/locales/pt-BR.yml +++ b/plugins/suppliers/locales/pt-BR.yml @@ -448,6 +448,7 @@ telephone: Telefone celular: Celular email: Email hub: Núcleo + choose_one_hub: "Escolha um núcleo" address: Endereço city: Cidade state: Estado diff --git a/plugins/suppliers/public/javascripts/views/consumer-view.tag.slim b/plugins/suppliers/public/javascripts/views/consumer-view.tag.slim index 2e53ea01b447950a2faa26fb15cdb0a791185162..53af376c76ffac6dd1df3b6d8ef0e39d51fc5770 100644 --- a/plugins/suppliers/public/javascripts/views/consumer-view.tag.slim +++ b/plugins/suppliers/public/javascripts/views/consumer-view.tag.slim @@ -61,7 +61,9 @@ label for="hub" class="col-sm-2 control-label" |{cs.t("views.consumer.index.hub")} .col-sm-10 select value='{consumer.hub_id}' name='hub_id' class="form-control" id="hub_id" - option each="{hubs}" value="{id}" + option value="" + |{cs.t("views.consumer.index.choose_one_hub")} + option each="{hubs}" value="{id}" selected="{consumer.hub_id == id}" |{name} .form-group