Просмотр исходного кода

Modify contract editor -- 修改合同编辑器(resolve: #14719)

Ray Zhang 4 лет назад
Родитель
Сommit
c7539fe79d

+ 255 - 201
Ants Contract/Granite Expo eSign/2021 GECI - Home Improvement Contract.json

@@ -1,36 +1,47 @@
 {
   "page_0": {
-    "control_22": {
-      "width": 199.99996948242188,
-      "tv_vmargin": 0.4,
-      "aname": "Sales Person",
+    "control_4": {
+      "width": 37,
+      "tv_vmargin": 0,
+      "aname": "Jobsite State",
       "type": "TextView",
-      "size": "11",
-      "pos_y": 19.907833099365234,
-      "field": "sales_person",
-      "value": "",
+      "size": "12",
+      "capital": "charater",
+      "pos_y": 257.0091857910156,
+      "field": "job_state",
+      "value": "CA",
+      "height": 26.999996185302734,
+      "margin_left": "1",
       "dirty": false,
-      "height": 13.271889686584473,
-      "margin_left": "4",
-      "margin_top": "1",
+      "margin_top": "-1",
       "required": true,
-      "pos_x": 154.5142822265625
+      "pos_x": 423.99993896484375,
+      "action": {
+        "set_val": {
+          "condition": "true",
+          "count": 1,
+          "item_0": {
+            "source": "2+3+4+5",
+            "page": "page_4",
+            "control": "control_9",
+            "value": "copy"
+          }
+        }
+      }
     },
-    "control_23": {
-      "width": 350.0018310546875,
-      "tv_vmargin": 0.4,
-      "aname": "Invoice Number",
-      "type": "TextView",
-      "size": "11",
-      "pos_y": 33.917049407958984,
-      "field": "invoice_number",
-      "value": "",
+    "control_17": {
+      "name": "Customer Initial",
+      "width": 29.999996185302734,
       "dirty": false,
-      "height": 13.271889686584473,
-      "margin_left": "4",
-      "margin_top": "1",
-      "required": false,
-      "pos_x": 169.99815368652344
+      "aname": "Initial",
+      "linewidth": 8,
+      "value": "",
+      "pos_y": 881.2625732421875,
+      "type": "Signature",
+      "height": 14.999998092651367,
+      "can_fill": "true",
+      "pos_x": 616,
+      "required": true
     },
     "control_1": {
       "dirty": false,
@@ -60,7 +71,19 @@
       "margin_left": "1",
       "margin_top": "-1",
       "required": true,
-      "pos_x": 242.83868408203125
+      "pos_x": 242.83868408203125,
+      "action": {
+        "set_val": {
+          "condition": "true",
+          "count": 1,
+          "item_0": {
+            "source": "2+3+4+5",
+            "page": "page_4",
+            "control": "control_9",
+            "value": "copy"
+          }
+        }
+      }
     },
     "control_5": {
       "width": 74,
@@ -76,7 +99,19 @@
       "margin_left": "1",
       "margin_top": "-1",
       "required": true,
-      "pos_x": 521.1289672851562
+      "pos_x": 521.1289672851562,
+      "action": {
+        "set_val": {
+          "condition": "true",
+          "count": 1,
+          "item_0": {
+            "source": "2+3+4+5",
+            "page": "page_4",
+            "control": "control_9",
+            "value": "copy"
+          }
+        }
+      }
     },
     "control_7": {
       "dirty": false,
@@ -93,7 +128,7 @@
       "required": true
     },
     "control_9": {
-      "required": true,
+      "margin_left": "4",
       "disable": false,
       "dirty": false,
       "width": 180.99996948242188,
@@ -118,23 +153,55 @@
       "keyboard": "number",
       "height": 29.999996185302734,
       "prefix_str": "$ ",
-      "pos_x": 462.9999694824219,
-      "margin_left": "4"
+      "required": true,
+      "pos_x": 462.9999694824219
     },
     "count": 24,
+    "control_22": {
+      "width": 199.99996948242188,
+      "tv_vmargin": 0.4,
+      "aname": "Sales Person",
+      "type": "TextView",
+      "size": "11",
+      "pos_y": 19.907833099365234,
+      "field": "sales_person",
+      "value": "",
+      "dirty": false,
+      "height": 13.271889686584473,
+      "margin_left": "4",
+      "margin_top": "1",
+      "required": true,
+      "pos_x": 154.5142822265625
+    },
+    "control_23": {
+      "width": 350.0018310546875,
+      "tv_vmargin": 0.4,
+      "aname": "Invoice Number",
+      "type": "TextView",
+      "size": "11",
+      "pos_y": 33.917049407958984,
+      "field": "invoice_number",
+      "value": "",
+      "dirty": false,
+      "height": 13.271889686584473,
+      "margin_left": "4",
+      "margin_top": "1",
+      "required": false,
+      "pos_x": 169.99815368652344
+    },
     "control_18": {
       "height": 21.999998092651367,
       "pos_x": 499.9999694824219,
-      "name": "BarCode",
+      "dirty": false,
       "width": 150,
       "pos_y": 905.3732299804688,
       "type": "Image",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "BarCode",
+      "value": ""
     },
     "control_20": {
-      "required": true,
+      "name": "Customer Initial",
       "width": 29.999996185302734,
       "pos_y": 829.6358642578125,
       "aname": "Initial",
@@ -144,8 +211,8 @@
       "dirty": false,
       "height": 14.999998092651367,
       "can_fill": true,
-      "pos_x": 617.474609375,
-      "name": "Customer Initial"
+      "required": true,
+      "pos_x": 617.474609375
     },
     "control_21": {
       "disable": true,
@@ -238,7 +305,6 @@
             0,
             0
           ]
-          
         ],
         [
           [
@@ -286,7 +352,7 @@
       "pos_x": 214.99996948242188
     },
     "control_12": {
-      "pos_x": 617.474609375,
+      "name": "Customer Initial",
       "width": 30.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -296,8 +362,8 @@
       "type": "Signature",
       "height": 14.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 617.474609375,
+      "required": true
     },
     "control_8": {
       "dirty": false,
@@ -318,7 +384,7 @@
       "pos_x": 214.99996948242188
     },
     "control_13": {
-      "pos_x": 617.474609375,
+      "name": "Customer Initial",
       "width": 29.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -328,11 +394,11 @@
       "type": "Signature",
       "height": 14.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 617.474609375,
+      "required": true
     },
     "control_14": {
-      "pos_x": 617.474609375,
+      "name": "Customer Initial",
       "width": 29.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -342,8 +408,8 @@
       "type": "Signature",
       "height": 14.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 617.474609375,
+      "required": true
     },
     "control_0": {
       "width": 168.99998474121094,
@@ -359,10 +425,21 @@
       "margin_left": "4",
       "margin_top": "1",
       "required": true,
-      "pos_x": 215.99998474121094
+      "pos_x": 215.99998474121094,
+      "action": {
+        "set_val": {
+          "condition": "true",
+          "count": 1,
+          "item_0": {
+            "page": "page_4",
+            "control": "control_10",
+            "value": "copy"
+          }
+        }
+      }
     },
     "control_15": {
-      "pos_x": 617.474609375,
+      "name": "Customer Initial",
       "width": 29.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -372,8 +449,8 @@
       "type": "Signature",
       "height": 14.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 617.474609375,
+      "required": true
     },
     "control_2": {
       "width": 395.9999694824219,
@@ -389,10 +466,22 @@
       "margin_left": "1",
       "margin_top": "-1",
       "required": true,
-      "pos_x": 247.99998474121094
+      "pos_x": 247.99998474121094,
+      "action": {
+        "set_val": {
+          "condition": "true",
+          "count": 1,
+          "item_0": {
+            "source": "2+3+4+5",
+            "page": "page_4",
+            "control": "control_9",
+            "value": "copy"
+          }
+        }
+      }
     },
     "control_16": {
-      "pos_x": 617.474609375,
+      "name": "Customer Initial",
       "width": 29.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -403,44 +492,13 @@
       "field": "",
       "height": 14.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
-    },
-    "control_4": {
-      "width": 37,
-      "tv_vmargin": 0,
-      "aname": "Jobsite State",
-      "type": "TextView",
-      "size": "12",
-      "capital": "charater",
-      "pos_y": 257.0091857910156,
-      "field": "job_state",
-      "value": "CA",
-      "height": 26.999996185302734,
-      "margin_left": "1",
-      "dirty": false,
-      "margin_top": "-1",
-      "required": true,
-      "pos_x": 423.99993896484375
-    },
-    "control_17": {
-      "pos_x": 616,
-      "width": 29.999996185302734,
-      "dirty": false,
-      "aname": "Initial",
-      "linewidth": 8,
-      "value": "",
-      "pos_y": 881.2625732421875,
-      "type": "Signature",
-      "height": 14.999998092651367,
-      "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 617.474609375,
+      "required": true
     }
   },
   "page_1": {
     "control_1": {
-      "required": true,
+      "name": "Decision Maker",
       "width": 200,
       "tv_vmargin": 0.6,
       "aname": "Decision Maker",
@@ -453,11 +511,11 @@
       "height": 20,
       "margin_left": "4",
       "margin_top": "1",
-      "pos_x": 230,
-      "name": "Decision Maker"
+      "required": true,
+      "pos_x": 230
     },
     "control_3": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -467,11 +525,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_5": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -481,11 +539,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_7": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 29,
       "dirty": false,
       "aname": "Initial",
@@ -495,11 +553,11 @@
       "type": "Signature",
       "height": 14,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_9": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -509,12 +567,12 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "count": 19,
     "control_10": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -524,11 +582,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_11": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -538,11 +596,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_12": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -552,11 +610,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_0": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -566,11 +624,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_2": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -580,11 +638,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_4": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -594,11 +652,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_6": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -608,8 +666,8 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_8": {
       "width": 464,
@@ -666,7 +724,7 @@
       "required": true
     },
     "control_13": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -676,11 +734,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_14": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -690,22 +748,22 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_15": {
       "height": 21.999998092651367,
       "pos_x": 499.9999694824219,
-      "name": "BarCode",
+      "dirty": false,
       "width": 150,
       "pos_y": 905.3732299804688,
       "type": "Image",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "BarCode",
+      "value": ""
     },
     "control_18": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -715,11 +773,11 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_17": {
-      "pos_x": 616,
+      "name": "Customer Initial",
       "width": 28.999996185302734,
       "dirty": false,
       "aname": "Initial",
@@ -729,8 +787,8 @@
       "type": "Signature",
       "height": 13.999998092651367,
       "can_fill": "true",
-      "required": true,
-      "name": "Customer Initial"
+      "pos_x": 616,
+      "required": true
     },
     "control_16": {
       "height": 10.999999046325684,
@@ -784,13 +842,13 @@
     "control_3": {
       "height": 21.999998092651367,
       "pos_x": 499.9999694824219,
-      "name": "BarCode",
+      "dirty": false,
       "width": 150,
       "pos_y": 905.3732299804688,
       "type": "Image",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "BarCode",
+      "value": ""
     },
     "control_1": {
       "textAlignment": "center",
@@ -849,27 +907,27 @@
     "control_0": {
       "height": 25.211978912353516,
       "pos_x": 403.5252990722656,
-      "name": "Homeowner",
+      "dirty": false,
       "linewidth": 8,
       "aname": "Homeowner Signature",
       "width": 145,
       "pos_y": 611.7234497070312,
       "type": "Signature",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "Homeowner",
+      "value": ""
     }
   },
   "page_3": {
     "control_12": {
-      "disable": true,
+      "disable": false,
       "textAlignment": "center",
       "width": 213.82489013671875,
       "pos_y": 823.5944213867188,
       "aname": "new add DatePicker",
       "type": "DatePicker",
       "field": "new add DatePicker",
-      "value": "NA",
+      "value": "",
       "dirty": false,
       "height": 29.999996185302734,
       "margin_left": "4",
@@ -896,7 +954,7 @@
     "control_4": {
       "required_validation": false,
       "validation_code": "1111",
-      "pos_x": 190.0829315185547,
+      "required": false,
       "width": 183.31796264648438,
       "pos_y": 823.5944213867188,
       "aname": "new add Signature",
@@ -905,8 +963,8 @@
       "value": "",
       "dirty": false,
       "height": 29.999996185302734,
-      "name": "new Add Signature",
-      "required": false
+      "pos_x": 190.0829315185547,
+      "name": "new Add Signature"
     },
     "control_14": {
       "textAlignment": "center",
@@ -939,14 +997,14 @@
     },
     "count": 16,
     "control_8": {
-      "disable": true,
+      "disable": false,
       "textAlignment": "center",
       "width": 392.2580261230469,
       "pos_y": 592.81103515625,
       "aname": "new add DatePicker",
       "type": "DatePicker",
       "field": "new add DatePicker",
-      "value": "NA",
+      "value": "",
       "dirty": false,
       "height": 11.059906959533691,
       "margin_left": "4",
@@ -1011,16 +1069,15 @@
             0
           ],
           {
-                      "memo": "action",
-                      "type": "change contract",
-                      "contract":"GECI - Home Improvement Contract - Tan.pdf",
-                      "conditional_constraint": {
-                        "true": {
-                          "contract":"GECI - Home Improvement Contract - Tan.pdf"
-                        },
-                        "false": {
-                      }
-                    }
+            "memo": "action",
+            "contract": "GECI - Home Improvement Contract - Tan.pdf",
+            "type": "change contract",
+            "conditional_constraint": {
+              "true": {
+                "contract": "GECI - Home Improvement Contract - Tan.pdf"
+              },
+              "false": {}
+            }
           }
         ],
         [
@@ -1034,16 +1091,15 @@
             0
           ],
           {
-                      "memo": "action",
-                      "type": "change contract",
-                      "contract":"GECI - Home Improvement Contract - Wilson Ma.pdf",
-                      "conditional_constraint": {
-                        "true": {
-                          "contract":"GECI - Home Improvement Contract - Wilson Ma.pdf"
-                        },
-                        "false": {
-                      }
-                    }
+            "memo": "action",
+            "contract": "GECI - Home Improvement Contract - Wilson Ma.pdf",
+            "type": "change contract",
+            "conditional_constraint": {
+              "true": {
+                "contract": "GECI - Home Improvement Contract - Wilson Ma.pdf"
+              },
+              "false": {}
+            }
           }
         ],
         [
@@ -1058,16 +1114,15 @@
             0
           ],
           {
-                      "memo": "action",
-                      "type": "change contract",
-                      "contract":"GECI - Home Improvement Contract - Jim Xu.pdf",
-                      "conditional_constraint": {
-                        "true": {
-                          "contract":"GECI - Home Improvement Contract - Jim Xu.pdf"
-                        },
-                        "false": {
-                      }
-                    }
+            "memo": "action",
+            "contract": "GECI - Home Improvement Contract - Jim Xu.pdf",
+            "type": "change contract",
+            "conditional_constraint": {
+              "true": {
+                "contract": "GECI - Home Improvement Contract - Jim Xu.pdf"
+              },
+              "false": {}
+            }
           }
         ],
         [
@@ -1082,16 +1137,15 @@
             0
           ],
           {
-                      "memo": "action",
-                      "type": "change contract",
-                      "contract":"GECI - Home Improvement Contract - Fong Huang.pdf",
-                      "conditional_constraint": {
-                        "true": {
-                          "contract":"GECI - Home Improvement Contract - Fong Huang.pdf"
-                        },
-                        "false": {
-                      }
-                    }
+            "memo": "action",
+            "contract": "GECI - Home Improvement Contract - Fong Huang.pdf",
+            "type": "change contract",
+            "conditional_constraint": {
+              "true": {
+                "contract": "GECI - Home Improvement Contract - Fong Huang.pdf"
+              },
+              "false": {}
+            }
           }
         ]
       ],
@@ -1163,14 +1217,14 @@
       "pos_x": 263.0783386230469
     },
     "control_3": {
-      "disable": true,
+      "disable": false,
       "textAlignment": "center",
       "width": 392.2580261230469,
       "pos_y": 538.9862060546875,
       "aname": "date",
       "type": "DatePicker",
       "field": "p4_date",
-      "value": "NA",
+      "value": "",
       "dirty": false,
       "height": 25.069124221801758,
       "margin_left": "4",
@@ -1197,13 +1251,13 @@
     "control_0": {
       "height": 21.999998092651367,
       "pos_x": 499.9999694824219,
-      "name": "BarCode",
+      "dirty": false,
       "width": 150,
       "pos_y": 905.3732299804688,
       "type": "Image",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "BarCode",
+      "value": ""
     }
   },
   "count": 5,
@@ -1367,7 +1421,7 @@
     "control_11": {
       "required_validation": false,
       "validation_code": "1111",
-      "name": "new Add Signature",
+      "pos_x": 471.741943359375,
       "width": 119.4469985961914,
       "pos_y": 869.3087158203125,
       "aname": "customer signature",
@@ -1376,8 +1430,8 @@
       "value": "",
       "dirty": false,
       "height": 29.493085861206055,
-      "required": false,
-      "pos_x": 471.741943359375
+      "name": "new Add Signature",
+      "required": false
     },
     "control_2": {
       "width": 99.99630737304688,
@@ -1540,13 +1594,13 @@
     "control_0": {
       "height": 21.999998092651367,
       "pos_x": 499.9999694824219,
-      "name": "BarCode",
+      "dirty": false,
       "width": 150,
       "pos_y": 905.3732299804688,
       "type": "Image",
       "required": true,
-      "value": "",
-      "dirty": false
+      "name": "BarCode",
+      "value": ""
     }
   }
 }

+ 4 - 4
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -19,7 +19,7 @@
 		3C6B6291272149D400E74CF9 /* GECI - Home Improvement Contract - Wilson Ma.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 3C6B628D272149D400E74CF9 /* GECI - Home Improvement Contract - Wilson Ma.pdf */; };
 		3C6B6292272149D400E74CF9 /* GECI - Home Improvement Contract - Jim Xu.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 3C6B628E272149D400E74CF9 /* GECI - Home Improvement Contract - Jim Xu.pdf */; };
 		3C6B6293272149D400E74CF9 /* GECI - Home Improvement Contract - Tan.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 3C6B628F272149D400E74CF9 /* GECI - Home Improvement Contract - Tan.pdf */; };
-		3C6B62A72727F12A00E74CF9 /* 2021 GECI - Home Improvement Contract.json in Resources */ = {isa = PBXBuildFile; fileRef = 3C6B62A62727F12A00E74CF9 /* 2021 GECI - Home Improvement Contract.json */; };
+		3C6B62A9272BEB7B00E74CF9 /* 2021 GECI - Home Improvement Contract.json in Resources */ = {isa = PBXBuildFile; fileRef = 3C6B62A8272BEB7B00E74CF9 /* 2021 GECI - Home Improvement Contract.json */; };
 		3CBB92F2248A26EB0099E429 /* NetworkUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CBB92F1248A26EB0099E429 /* NetworkUtils.m */; };
 		3CC7E73423BEDE9700BE5561 /* RAPDFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CC7E73323BEDE9700BE5561 /* RAPDFViewController.m */; };
 		3CC7E73623BEDEA000BE5561 /* wkweb.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3CC7E73523BEDEA000BE5561 /* wkweb.storyboard */; };
@@ -119,7 +119,7 @@
 		3C6B628D272149D400E74CF9 /* GECI - Home Improvement Contract - Wilson Ma.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GECI - Home Improvement Contract - Wilson Ma.pdf"; sourceTree = "<group>"; };
 		3C6B628E272149D400E74CF9 /* GECI - Home Improvement Contract - Jim Xu.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GECI - Home Improvement Contract - Jim Xu.pdf"; sourceTree = "<group>"; };
 		3C6B628F272149D400E74CF9 /* GECI - Home Improvement Contract - Tan.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "GECI - Home Improvement Contract - Tan.pdf"; sourceTree = "<group>"; };
-		3C6B62A62727F12A00E74CF9 /* 2021 GECI - Home Improvement Contract.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "2021 GECI - Home Improvement Contract.json"; sourceTree = "<group>"; };
+		3C6B62A8272BEB7B00E74CF9 /* 2021 GECI - Home Improvement Contract.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "2021 GECI - Home Improvement Contract.json"; sourceTree = "<group>"; };
 		3CBB92F0248A26EB0099E429 /* NetworkUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkUtils.h; path = ../../../common/NetworkUtils.h; sourceTree = "<group>"; };
 		3CBB92F1248A26EB0099E429 /* NetworkUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NetworkUtils.m; path = ../../../common/NetworkUtils.m; sourceTree = "<group>"; };
 		3CC7E73223BEDE9700BE5561 /* RAPDFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RAPDFViewController.h; path = "../../../common/WK PDF+Web/RAPDFViewController.h"; sourceTree = "<group>"; };
@@ -556,7 +556,7 @@
 		7128C3261E1251DE00FF635B /* pdf resource */ = {
 			isa = PBXGroup;
 			children = (
-				3C6B62A62727F12A00E74CF9 /* 2021 GECI - Home Improvement Contract.json */,
+				3C6B62A8272BEB7B00E74CF9 /* 2021 GECI - Home Improvement Contract.json */,
 				3C6B628C272149D400E74CF9 /* GECI - Home Improvement Contract - Fong Huang.pdf */,
 				3C6B628E272149D400E74CF9 /* GECI - Home Improvement Contract - Jim Xu.pdf */,
 				3C6B628F272149D400E74CF9 /* GECI - Home Improvement Contract - Tan.pdf */,
@@ -658,8 +658,8 @@
 				425A00F41F8F196900286D6F /* attribute_template.json in Resources */,
 				7128C24B1E124F4500FF635B /* Assets.xcassets in Resources */,
 				7128C26F1E124FF200FF635B /* Main.storyboard in Resources */,
-				3C6B62A72727F12A00E74CF9 /* 2021 GECI - Home Improvement Contract.json in Resources */,
 				3CC7E73623BEDEA000BE5561 /* wkweb.storyboard in Resources */,
+				3C6B62A9272BEB7B00E74CF9 /* 2021 GECI - Home Improvement Contract.json in Resources */,
 				3C69618E23C819F70075172A /* 2020 GECI - Home Improvement Contract.pdf in Resources */,
 				42DDB87A1F91DCE8002CCE22 /* ControlTemplateCell.xib in Resources */,
 				7128C27D1E12500B00FF635B /* signature.storyboard in Resources */,

+ 10 - 4
Ants Contract/common/DocumentPageViewController.m

@@ -189,6 +189,14 @@
 {
 
 }
+
+-(void) setupTemplete
+{
+    if(self.action==PDFEditActionNew)
+        self.controlTemplate = [self templateInit:[PDFUtils loadControl:self.templatePath]];
+    else
+        self.controlTemplate =[PDFUtils loadControl:self.templatePath];
+}
 -(void) setupDocument
 {
     self.signatureData= [[NSMutableDictionary alloc] init];
@@ -200,10 +208,7 @@
     }
     self.document = [PDFUtils OpenPDF:self.pdfPath];
     self.total_page = CGPDFDocumentGetNumberOfPages (self.document);
-    if(self.action==PDFEditActionNew)
-        self.controlTemplate = [self templateInit:[PDFUtils loadControl:self.templatePath]];
-    else
-        self.controlTemplate =[PDFUtils loadControl:self.templatePath];
+
     
     
 
@@ -229,6 +234,7 @@
     [self.view insertSubview:v atIndex:0];
     
     [self setupDocument];
+    [self setupTemplete];
 //    self.signatureData= [[NSMutableDictionary alloc] init];
 //
 //

+ 30 - 0
Ants Contract/common/PageViewController.m

@@ -1691,6 +1691,36 @@ typedef enum {
                 self.page_controlTemplate [control[@"control"] ][@"value"] = newvalue;
                 self.page_controlTemplate [control[@"control"] ][@"dirty"] = [NSNumber numberWithBool:true];
             }
+            else if([value isEqualToString:@"copy"])
+            {
+                NSString* page = control[@"page"];
+                NSString* controln = control[@"control"];
+                NSString* source = control[@"source"];
+                if([source isEqualToString:@"2+3+4+5"])
+                {
+                    NSString* newval;
+                    NSString* s2=self.page_controlTemplate[@"control_2"][@"value"];
+                    NSString* s3=self.page_controlTemplate[@"control_3"][@"value"];
+                    NSString* s4=self.page_controlTemplate[@"control_4"][@"value"];
+                    NSString* s5=self.page_controlTemplate[@"control_5"][@"value"];
+                    
+                    if(s2==nil)
+                        s2=@"";
+                    if(s3==nil)
+                        s3=@"";
+                    if(s4==nil)
+                        s4=@"";
+                    if(s5==nil)
+                        s5=@"";
+                    
+                    newval=[NSString stringWithFormat:@"%@, %@, %@ %@",s2,s3,s4,s5];
+
+                    self.doc_controlTemplate[page][controln][@"value"]=newval;
+                }
+                else
+                    self.doc_controlTemplate[page][controln][@"value"]=text;
+                ;
+            }
             
             tv.text = newvalue;