Skip to content

Commit

Permalink
fix(form): modify form fields
Browse files Browse the repository at this point in the history
  • Loading branch information
zack9433 committed Oct 17, 2016
1 parent 0427a38 commit 62f4f0a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 14 deletions.
35 changes: 30 additions & 5 deletions app/component/component.resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,42 @@
"key": "enable",
"type": "switch",
"templateOptions": {
"label": "CELLULAR_FORM_LABEL_ENABLE",
"required": true
"label": "CELLULAR_FORM_LABEL_ENABLE"
}
},
{
"key": "apn",
"key": "pdpContext.static",
"type": "switch",
"templateOptions": {
"label": "CELLULAR_FORM_LABEL_PRIVATE_NETWORK"
}
},
{
"key": "pdpContext.primary.apn",
"type": "input",
"templateOptions": {
"label": "CELLULAR_FORM_LABEL_APN",
"label": "CELLULAR_FORM_LABEL_PRIMARY_APN",
"required": true
}
},
"hideExpression": "!model.pdpContext.static"
},
{
"key": "pdpContext.secondary.apn",
"type": "input",
"templateOptions": {
"label": "CELLULAR_FORM_LABEL_SECONDARY_APN"
},
"hideExpression": "!model.pdpContext.static"
},
{
"key": "pdpContext.id",
"type": "number",
"templateOptions": {
"label": "CELLULAR_FORM_LABEL_PACKET_DATA_PROTOCOL",
"min": 1,
"max": 16
},
"hideExpression": "!!model.pdpContext.static"
},
{
"key": "pinCode",
Expand Down
20 changes: 13 additions & 7 deletions app/component/info/info.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,19 @@
<p class="md-body-2" translate="CELLULAR_INFO_OPERATOR"></p>
<span ng-bind="tab.content.operatorName"></span>
</md-list-item>
<md-list-item>
<p class="md-body-2" translate="CELLULAR_INFO_PRIMARY_APN"></p>
<span ng-bind="tab.content.pdpContext.primary.apn"></span>
</md-list-item>
<md-list-item>
<p class="md-body-2" translate="CELLULAR_INFO_SECONDARY_APN"></p>
<span ng-bind="tab.content.pdpContext.secondary.apn"></span>
<div ng-if="tab.content.pdpContext.static">
<md-list-item>
<p class="md-body-2" translate="CELLULAR_INFO_PRIMARY_APN"></p>
<span ng-bind="tab.content.pdpContext.primary.apn"></span>
</md-list-item>
<md-list-item>
<p class="md-body-2" translate="CELLULAR_INFO_SECONDARY_APN"></p>
<span ng-bind="tab.content.pdpContext.secondary.apn"></span>
</md-list-item>
</div>
<md-list-item ng-if="!tab.content.pdpContext.static">
<p class="md-body-2" translate="CELLULAR_INFO_PACKET_DATA_PROTOCOL"></p>
<span ng-bind="tab.content.pdpContext.id"></span>
</md-list-item>
<md-list-item>
<p class="md-body-2" translate="CELLULAR_INFO_MODE"></p>
Expand Down
6 changes: 5 additions & 1 deletion app/component/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"CELLULAR_SEC": "sec.",
"CELLULAR_FORM_SETTING": "Setting",
"CELLULAR_FORM_LABEL_ENABLE": "Enable",
"CELLULAR_FORM_LABEL_APN": "APN",
"CELLULAR_FORM_LABEL_PRIVATE_NETWORK": "Use Static APN",
"CELLULAR_FORM_LABEL_PRIMARY_APN": "Primary APN",
"CELLULAR_FORM_LABEL_SECONDARY_APN": "Secondary APN",
"CELLULAR_FORM_LABEL_PACKET_DATA_PROTOCOL": "PDP CID",
"CELLULAR_FORM_LABEL_PINCODE": "Pin Code",
"CELLULAR_FORM_LABEL_ENABLE_KEEPALIVE": "Enable Keep-alive",
"CELLULAR_FORM_LABEL_TARGET_HOST": "Target Host",
Expand All @@ -15,6 +18,7 @@
"CELLULAR_INFO_OPERATOR": "Operator Name",
"CELLULAR_INFO_CONNECTION_STATUS": "Connection Status",
"CELLULAR_INFO_APN": "APN",
"CELLULAR_INFO_PACKET_DATA_PROTOCOL": "PDP CID",
"CELLULAR_INFO_PRIMARY_APN": "Primary APN",
"CELLULAR_INFO_SECONDARY_APN": "Secondary APN",
"CELLULAR_INFO_MODE": "Mode",
Expand Down
6 changes: 5 additions & 1 deletion app/component/lang/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"CELLULAR": "Cellular",
"CELLULAR_FORM_SETTING": "設定",
"CELLULAR_FORM_LABEL_ENABLE": "啟用",
"CELLULAR_FORM_LABEL_APN": "APN",
"CELLULAR_FORM_LABEL_PRIVATE_NETWORK": "使用固定 APN",
"CELLULAR_FORM_LABEL_PRIMARY_APN": "主要的 APN",
"CELLULAR_FORM_LABEL_SECONDARY_APN": "次要的 APN",
"CELLULAR_FORM_LABEL_PACKET_DATA_PROTOCOL": "PDP CID",
"CELLULAR_FORM_LABEL_PINCODE": "Pin 碼",
"CELLULAR_FORM_LABEL_ENABLE_KEEPALIVE": "啟用保持連線",
"CELLULAR_FORM_LABEL_TARGET_HOST": "目標主機",
Expand All @@ -13,6 +16,7 @@
"CELLULAR_INFO_OPERATOR": "營運商名稱",
"CELLULAR_INFO_CONNECTION_STATUS": "連線狀態",
"CELLULAR_INFO_APN": "APN",
"CELLULAR_INFO_PACKET_DATA_PROTOCOL": "PDP CID",
"CELLULAR_INFO_PRIMARY_APN": "主要的 APN",
"CELLULAR_INFO_SECONDARY_APN": "次要 APN",
"CELLULAR_INFO_MODE": "模式",
Expand Down

0 comments on commit 62f4f0a

Please sign in to comment.