added js to change label, CRM-12753
authorkurund <kurund@civicrm.org>
Thu, 2 Jan 2014 04:25:36 +0000 (20:25 -0800)
committerkurund <kurund@civicrm.org>
Thu, 2 Jan 2014 04:25:36 +0000 (20:25 -0800)
----------------------------------------
* CRM-12753: Searching for contacts by date created
  http://issues.civicrm.org/jira/browse/CRM-12753

templates/CRM/Contact/Form/Search/Criteria/ChangeLog.tpl

index 698f8073cf6b62a7a96f5ce5d6c11d714101fbab..94c3930cd4c04cd98fbe6920a11f8077dc6158f9 100644 (file)
@@ -36,7 +36,8 @@
      </tr>
      <tr>
   <td>
-     <label>{ts}Modified Between{/ts}</label>
+     <span id="modbet"><label>{ts}Modified Between{/ts}</label></span>
+     <span id="addbet" class="hiddenElement"><label>{ts}Added Between{/ts}</label></span>
   </td>
      </tr>
      <tr>
      </tr>
    </table>
  </div>
+
+{literal}
+  <script type="text/javascript">
+    cj(function () {
+      var changeType = cj('input[name=log_date]:checked').val();
+      if (changeType == 2) {
+        cj('#addbet').hide();
+        cj('#modbet').show();
+      }
+      else if (changeType == 1) {
+        cj('#addbet').show();
+        cj('#modbet').hide();
+      }
+    });
+
+    cj('[name=log_date]:input').change(function () {
+      var changeType = cj('input[name=log_date]:checked').val();
+      if (changeType == 2) {
+        cj('#addbet').hide();
+        cj('#modbet').show();
+      }
+      else if (changeType == 1) {
+        cj('#addbet').show();
+        cj('#modbet').hide();
+      }
+    }).change();
+  </script>
+{/literal}