@ -2,26 +2,26 @@
<div class="card">
<div class="card">
<div class="card-body">
<div class="card-body">
<h1 class="card-title">New Smart Contract</h1>
<h1 class="card-title"><%= gettext " New Smart Contract" %> </h1>
<%= form_for @changeset,
<%= form_for @changeset,
address_verify_contract_path(@conn, :create, @conn.params["address_id"]),
address_verify_contract_path(@conn, :create, @conn.params["address_id"]),
fn f -> %>
fn f -> %>
<div class="form-group">
<div class="form-group">
<%= label f, :address_hash, "Contract Address" %>
<%= label f, :address_hash, gettext( "Contract Address") %>
<%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %>
<%= text_input f, :address_hash, class: "form-control", "aria-describedby": "contract-address-help-block", readonly: true %>
<%= error_tag f, :address_hash, id: "contract-address-help-block", class: "text-danger" %>
<%= error_tag f, :address_hash, id: "contract-address-help-block", class: "text-danger" %>
</div>
</div>
<div class="form-group">
<div class="form-group">
<%= label f, :name, "Contract Name" %>
<%= label f, :name, gettext( "Contract Name") %>
<%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %>
<%= text_input f, :name, class: "form-control", "aria-describedby": "contract-name-help-block", "data-test": "contract_name" %>
<%= error_tag f, :name, id: "contract-name-help-block", class: "text-danger" %>
<%= error_tag f, :name, id: "contract-name-help-block", class: "text-danger" %>
</div>
</div>
<div class="form-group mb-4">
<div class="form-group mb-4">
<%= label f, :compiler_version, "Compiler" %>
<%= label f, :compiler_version, gettext( "Compiler") %>
<%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %>
<%= select f, :compiler_version, @compiler_versions, class: "form-control", selected: "latest", "aria-describedby": "compiler-help-block" %>
<%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %>
<%= error_tag f, :compiler_version, id: "compiler-help-block", class: "text-danger" %>
</div>
</div>
@ -31,19 +31,19 @@
<div class="form-check mb-2">
<div class="form-check mb-2">
<%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= radio_button f, :optimization, false, checked: true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= label :smart_contract_optimization, :false, "No", class: "form-check-label" %>
<%= label :smart_contract_optimization, :false, gettext( "No") , class: "form-check-label" %>
</div>
</div>
<div class="form-check">
<div class="form-check">
<%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= radio_button f, :optimization, true, class: "form-check-input", "aria-describedby": "optimization-help-block" %>
<%= label :smart_contract_optimization, :true, "Yes", class: "form-check-label" %>
<%= label :smart_contract_optimization, :true, gettext( "Yes") , class: "form-check-label" %>
</div>
</div>
<%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger" %>
<%= error_tag f, :optimization, id: "optimization-help-block", class: "text-danger" %>
</div>
</div>
<div class="form-group mb-4">
<div class="form-group mb-4">
<%= label f, :contract_source_code, "Enter the Solidity Contract Code below" %>
<%= label f, :contract_source_code, gettext( "Enter the Solidity Contract Code below") %>
<%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %>
<%= textarea f, :contract_source_code, class: "form-control monospace", rows: 3, "aria-describedby": "contract-source-code-help-block" %>
<%= error_tag f, :contract_source_code, id: "contract-source-code-help-block", class: "text-danger", "data-test": "contract-source-code-error" %>
<%= error_tag f, :contract_source_code, id: "contract-source-code-help-block", class: "text-danger", "data-test": "contract-source-code-error" %>
</div>
</div>
@ -56,10 +56,10 @@
class="d-none px-4 position-absolute button button-primary button-sm mr-2">
class="d-none px-4 position-absolute button button-primary button-sm mr-2">
<i class="fa fa-spinner fa-spin"></i> <%= gettext("loading.....") %>
<i class="fa fa-spinner fa-spin"></i> <%= gettext("loading.....") %>
</button>
</button>
<%= submit "Verify and publish", class: "button button-primary button-sm mr-2", "data-loading": "animation" %>
<%= submit gettext( "Verify and publish") , class: "button button-primary button-sm mr-2", "data-loading": "animation" %>
<%= reset "Reset", class: "button button-secondary button-sm mr-2" %>
<%= reset gettext( "Reset") , class: "button button-secondary button-sm mr-2" %>
<%= link(
<%= link(
"Cancel",
gettext( "Cancel") ,
to: address_contract_path(@conn, :index, @conn.params["address_id"]),
to: address_contract_path(@conn, :index, @conn.params["address_id"]),
class: "button button-sm") %>
class: "button button-sm") %>
<% end %>
<% end %>