rvr-nextgen/views/communities/community_edit.php

21 lines
1.2 KiB
PHP
Raw Normal View History

2023-04-16 03:31:40 +02:00
@extends(templates/layout_normal)
@section(main)
<h2><?= isset($community) ? $community->getName() . ' - Edit' : 'New community' ?></h2>
<div class="box">
<?php
$formAction = isset($community) ?
Container::$routeCollection->getRoute('community-edit-action')->generateLink(['communityId' => $community->getId()]) :
Container::$routeCollection->getRoute('community-new-action')->generateLink();
?>
2023-04-16 20:54:29 +02:00
<form id="communityForm" action="<?= $formAction ?>" method="post" data-redirect-on-success="true">
2023-04-16 03:31:40 +02:00
<input type="text" class="text big fullWidth" name="name" placeholder="Name" value="<?= isset($community) ? $community->getName() : '' ?>" required>
<input type="text" class="text big fullWidth marginTop" name="currency" value="<?= isset($community) ? $community->getCurrency() : '' ?>" placeholder="Default currency" maxlength="3" required>
<p id="accountFormError" class="formError justify marginTop"></p>
<div class="right marginTop">
<button type="submit" name="submit"><?= isset($community) ? 'Save' : 'Create' ?></button>
</div>
</form>
</div>
@endsection