2015-07-23 15:58:48 +00:00
|
|
|
<vn>
|
|
|
|
<vn-group>
|
|
|
|
<db-form id="user-form">
|
2015-11-09 08:14:33 +00:00
|
|
|
<db-model property="model" id="user-model" updatable="true">
|
|
|
|
<custom>
|
2018-01-02 13:16:41 +00:00
|
|
|
SELECT id, defaultAddressFk
|
|
|
|
FROM myClient c
|
2015-11-09 08:14:33 +00:00
|
|
|
</custom>
|
2015-07-23 15:58:48 +00:00
|
|
|
</db-model>
|
|
|
|
</db-form>
|
|
|
|
<db-model id="addresses" updatable="true">
|
2015-11-09 08:14:33 +00:00
|
|
|
<custom>
|
2018-01-02 13:16:41 +00:00
|
|
|
SELECT a.id, a.nickname, p.name province, a.postalCode,
|
2018-01-22 08:52:43 +00:00
|
|
|
a.city, a.street, a.isActive, c.country
|
2018-01-02 13:16:41 +00:00
|
|
|
FROM myAddress a
|
|
|
|
LEFT JOIN vn.province p ON p.id = a.provinceFk
|
|
|
|
JOIN vn.country c ON c.id = p.countryFk
|
2018-01-22 08:52:43 +00:00
|
|
|
WHERE a.isActive
|
2015-11-09 08:14:33 +00:00
|
|
|
</custom>
|
2015-07-23 15:58:48 +00:00
|
|
|
</db-model>
|
|
|
|
</vn-group>
|
2015-09-11 09:37:16 +00:00
|
|
|
<div id="title">
|
|
|
|
<h1><t>Addresses</t></h1>
|
|
|
|
</div>
|
2015-09-16 16:11:15 +00:00
|
|
|
<div id="actions">
|
2016-09-19 06:40:18 +00:00
|
|
|
<htk-bar-button
|
|
|
|
icon="add"
|
2015-09-16 16:11:15 +00:00
|
|
|
tip="_AddAddress"
|
2016-09-19 06:40:18 +00:00
|
|
|
on-click="onAddAddressClick"/>
|
2015-09-11 09:37:16 +00:00
|
|
|
</div>
|
2015-07-23 15:58:48 +00:00
|
|
|
<div id="form" class="address-list">
|
|
|
|
<div class="box">
|
2015-12-02 17:26:58 +00:00
|
|
|
<htk-radio-group
|
|
|
|
id="default-address"
|
2018-01-02 13:16:41 +00:00
|
|
|
column="defaultAddressFk"
|
2015-12-02 17:26:58 +00:00
|
|
|
form="user-form"/>
|
|
|
|
<htk-repeater model="addresses" form-id="iter">
|
|
|
|
<custom>
|
|
|
|
<div class="address">
|
|
|
|
<div class="actions">
|
|
|
|
<htk-radio
|
|
|
|
form="iter"
|
|
|
|
column="id"
|
|
|
|
radio-group="default-address"
|
|
|
|
tip="_SetAsDefault"/>
|
|
|
|
<htk-button
|
|
|
|
form="iter"
|
|
|
|
column="id"
|
|
|
|
tip="_RemoveAddress"
|
2016-09-26 09:28:47 +00:00
|
|
|
icon="delete"
|
2015-12-02 17:26:58 +00:00
|
|
|
on-click="onRemoveAddressClick"/>
|
|
|
|
<htk-button
|
|
|
|
form="iter"
|
|
|
|
column="id"
|
|
|
|
tip="_EditAddress"
|
2016-09-26 09:28:47 +00:00
|
|
|
icon="edit"
|
2015-12-02 17:26:58 +00:00
|
|
|
on-click="onEditAddressClick"/>
|
2015-11-09 08:14:33 +00:00
|
|
|
</div>
|
2015-12-02 17:26:58 +00:00
|
|
|
<p class="important">
|
2018-01-02 13:16:41 +00:00
|
|
|
<htk-text form="iter" column="nickname"/>
|
2015-12-02 17:26:58 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2018-01-02 13:16:41 +00:00
|
|
|
<htk-text form="iter" column="street"/>
|
2015-12-02 17:26:58 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2018-01-02 13:16:41 +00:00
|
|
|
<htk-text form="iter" column="postalCode"/>,
|
2015-12-02 17:26:58 +00:00
|
|
|
<htk-text form="iter" column="city"/>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</custom>
|
|
|
|
</htk-repeater>
|
2015-07-23 15:58:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</vn>
|