+++ /dev/null
-<div>Hello {{routeParams.name}}.</div>
-<div>The foo says "<span fakelib-foo/>".</div>
-<div>The bare file says "<span fakelib-bare-file/>"</div>
+++ /dev/null
-{"server_route": "civicrm/example-page", "requires":["fakelibFoo", "fakelibBareFile"]}
{
"server_route": "civicrm/afex",
- "requires":["fakelibFoo", "fakelibBareFile", "af", "afBlock", "afField"]
+ "requires":["mockFoo", "mockBareFile", "af", "afBlock", "afField"]
}
--- /dev/null
+<div>Hello {{routeParams.name}}.</div>
+<div>The foo says "<span mock-foo/>".</div>
+<div>The bare file says "<span mock-bare-file/>"</div>
--- /dev/null
+{"server_route": "civicrm/mock-page", "requires":["mockFoo", "mockBareFile"]}
<div crm-ui-debug="modelListCtrl.getEntity('parent')" />
<div crm-ui-debug="modelListCtrl.getData('parent')" />
<af-entity type="Contact" data="{contact_type: 'Individual'}" name="parent" label="Parent" url-autofill="1" autofill="user" />
- <af-entity type="Contact" name="spouse" label="Spouse" url-autofill="1" />
+ <af-entity type="Contact" data="{contact_type: 'Individual'}" name="spouse" label="Spouse" contact-relationship="['Spouse of', 'parent']" />
<af-fieldset model="parent">
- <af-field name="first_name" defn='{title: ts("Your First Name")}' />
+ <h3>About You</h3>
+
+ <af-field name="first_name" />
<af-field name="last_name" />
- <af-field name="contact_sub_type" defn="{widget: hidden}" value="Student" />
<af-field name="gender_id" />
<af-field name="constituent_information.Marital_Status" />
<af-field name="constituent_information.Marriage_Date" />
<af-field name="constituent_information.Most_Important_Issue" />
</af-fieldset>
- <af-fieldset model="spouse">
+ <af-fieldset model="spouse" ng-if="modelListCtrl.getData('parent')['constituent_information.Marital_Status'] == 'M'">
+ <h3>About Your Spouse</h3>
+
<af-field name="first_name" defn='{title: ts("Spouse First Name")}' />
- <af-field name="last_name" />
+ <af-field name="last_name" defn='{title: ts("Spouse Last Name")}' />
+ <af-field name="do_not_email" />
</af-fieldset>
<!-- General elements: FIELDSET, UL, BUTTON, P, H1 should work anywhere -->
public function getBasicDirectives() {
return [
- ['afExamplePage', ['title' => '', 'description' => '', 'server_route' => 'civicrm/example-page']],
- ['fakelibBareFile', ['title' => '', 'description' => '']],
- ['fakelibFoo', ['title' => '', 'description' => '']],
+ ['mockPage', ['title' => '', 'description' => '', 'server_route' => 'civicrm/mock-page']],
+ ['mockBareFile', ['title' => '', 'description' => '']],
+ ['mockFoo', ['title' => '', 'description' => '']],
];
}
$formats = ['html', 'shallow', 'deep'];
foreach ($formats as $updateFormat) {
foreach ($formats as $readFormat) {
- $es[] = ['fakelibBareFile', $updateFormat, $example[$updateFormat], $readFormat, $example[$readFormat], $exampleFile];
+ $es[] = ['mockBareFile', $updateFormat, $example[$updateFormat], $readFormat, $example[$readFormat], $exampleFile];
}
}
}