19b5537c3SGreg Roach<?php use Fisharebest\Webtrees\Bootstrap4; ?> 29b5537c3SGreg Roach<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?> 39b5537c3SGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 49b5537c3SGreg Roach<?php use Fisharebest\Webtrees\View; ?> 59b5537c3SGreg Roach 69b5537c3SGreg Roach<h2 class="wt-page-title"> 79b5537c3SGreg Roach <?= $title ?> 89b5537c3SGreg Roach</h2> 99b5537c3SGreg Roach 109b5537c3SGreg Roach<form class="wt-page-options wt-page-options-ancestors-chart d-print-none"> 119b5537c3SGreg Roach <input type="hidden" name="route" value="module"> 129b5537c3SGreg Roach <input type="hidden" name="module" value="<?= e($module_name) ?>"> 139b5537c3SGreg Roach <input type="hidden" name="action" value="Chart"> 149b5537c3SGreg Roach <input type="hidden" name="ged" value="<?= e($tree->name()) ?>"> 159b5537c3SGreg Roach 169b5537c3SGreg Roach <div class="row form-group"> 179b5537c3SGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="xref"> 189b5537c3SGreg Roach <?= I18N::translate('Individual') ?> 199b5537c3SGreg Roach </label> 209b5537c3SGreg Roach <div class="col-sm-9 wt-page-options-value"> 219b5537c3SGreg Roach <?= FunctionsEdit::formControlIndividual($tree, $individual, ['id' => 'xref', 'name' => 'xref']) ?> 229b5537c3SGreg Roach </div> 239b5537c3SGreg Roach </div> 249b5537c3SGreg Roach 259b5537c3SGreg Roach <div class="row form-group"> 269b5537c3SGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="generations"> 279b5537c3SGreg Roach <?= I18N::translate('Generations') ?> 289b5537c3SGreg Roach </label> 299b5537c3SGreg Roach <div class="col-sm-9 wt-page-options-value"> 309b5537c3SGreg Roach <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required> 319b5537c3SGreg Roach </div> 329b5537c3SGreg Roach </div> 339b5537c3SGreg Roach 349b5537c3SGreg Roach <fieldset class="form-group"> 359b5537c3SGreg Roach <div class="row"> 369b5537c3SGreg Roach <legend class="col-form-label col-sm-3 wt-page-options-label"> 379b5537c3SGreg Roach <?= I18N::translate('Layout') ?> 389b5537c3SGreg Roach </legend> 399b5537c3SGreg Roach <div class="col-sm-9 wt-page-options-value"> 409b5537c3SGreg Roach <?= Bootstrap4::radioButtons('chart_style', $chart_styles, $chart_style, true) ?> 419b5537c3SGreg Roach <?= Bootstrap4::checkbox(I18N::translate('Show cousins'), false, ['name' => 'show_cousins', 'disabled' => $chart_style !== 'booklet', 'checked' => $show_cousins]) ?> 429b5537c3SGreg Roach </div> 439b5537c3SGreg Roach </div> 449b5537c3SGreg Roach </fieldset> 459b5537c3SGreg Roach 469b5537c3SGreg Roach <div class="row form-group"> 479b5537c3SGreg Roach <div class="col-form-label col-sm-3 wt-page-options-label"></div> 489b5537c3SGreg Roach <div class="col-sm-9 wt-page-options-value"> 499b5537c3SGreg Roach <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>"> 509b5537c3SGreg Roach </div> 519b5537c3SGreg Roach </div> 529b5537c3SGreg Roach</form> 539b5537c3SGreg Roach 54*242a7862SGreg Roach<div class="wt-ajax-load wt-page-content wt-chart wt-chart-ancestors" data-ajax-url="<?= e($ajax_url) ?>"></div> 559b5537c3SGreg Roach 569b5537c3SGreg Roach<?php View::push('javascript') ?> 579b5537c3SGreg Roach<script> 589b5537c3SGreg Roach // The "show cousins" option is only available for the "booklet" style. 599b5537c3SGreg Roach $("input[name=chart_style]").change(function () { 609b5537c3SGreg Roach $("input[name=show_cousins]").prop("disabled", $(this).val() !== "booklet"); 619b5537c3SGreg Roach }); 629b5537c3SGreg Roach</script> 639b5537c3SGreg Roach<?php View::endpush() ?> 64