103 lines
5.0 KiB
PHP
103 lines
5.0 KiB
PHP
<div class="page-header">
|
|
<h1><?= $org ? 'تعديل' : 'إضافة' ?> منظمة / جهة استثمارية</h1>
|
|
</div>
|
|
|
|
<?php if ($flashError = $this->session->getFlash('error')): ?>
|
|
<div class="alert alert-error"><span><?= $this->escape($flashError) ?></span></div>
|
|
<?php endif; ?>
|
|
|
|
<div class="glass-panel" style="max-width: 700px;">
|
|
<form action="/admin/organizations/<?= $org ? 'store' : 'store' ?>" method="POST" class="form-stacked">
|
|
<?php if ($org): ?>
|
|
<input type="hidden" name="id" value="<?= $org['id'] ?>">
|
|
<?php endif; ?>
|
|
<input type="hidden" name="_csrf" value="<?= $this->session->getCsrfToken() ?>">
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label class="form-label">الاسم *</label>
|
|
<input type="text" name="name" class="form-control" required value="<?= $org ? $this->escape($org['name']) : '' ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">النطاق (Domain)</label>
|
|
<input type="text" name="domain" class="form-control" placeholder="example.com" value="<?= $org ? $this->escape($org['domain'] ?? '') : '' ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label class="form-label">النوع</label>
|
|
<select name="type" class="form-control">
|
|
<?php
|
|
$typeTrans = [
|
|
'vc' => 'رأس مال جريء',
|
|
'angel' => 'مستثمر ملائكي',
|
|
'accelerator' => 'مسرعة أعمال',
|
|
'incubator' => 'حاضنة أعمال',
|
|
'venture_studio' => 'استوديو مشاريع',
|
|
'partner' => 'شريك',
|
|
'other' => 'أخرى'
|
|
];
|
|
?>
|
|
<?php foreach ($types as $t): ?>
|
|
<option value="<?= $t ?>" <?= ($org && $org['type'] === $t) ? 'selected' : '' ?>><?= $typeTrans[$t] ?? ucfirst($t) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">الحالة في CRM</label>
|
|
<select name="crm_status" class="form-control">
|
|
<?php
|
|
$crmTrans = [
|
|
'New' => 'جديد',
|
|
'Researching' => 'قيد البحث',
|
|
'Contacted' => 'تم التواصل',
|
|
'Invested' => 'تم الاستثمار',
|
|
'Rejected' => 'مرفوض'
|
|
];
|
|
?>
|
|
<?php foreach ($statuses as $s): ?>
|
|
<option value="<?= $s ?>" <?= ($org && $org['crm_status'] === $s) ? 'selected' : '' ?>><?= $crmTrans[$s] ?? $s ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label class="form-label">الدولة</label>
|
|
<input type="text" name="country" class="form-control" placeholder="مثال: الإمارات" value="<?= $org ? $this->escape($org['country'] ?? '') : '' ?>">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">المدينة</label>
|
|
<input type="text" name="city" class="form-control" placeholder="مثال: دبي" value="<?= $org ? $this->escape($org['city'] ?? '') : '' ?>">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">رابط الموقع الإلكتروني</label>
|
|
<input type="url" name="website_url" class="form-control" placeholder="https://example.com" value="<?= $org ? $this->escape($org['website_url'] ?? '') : '' ?>">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">مرحلة التمويل</label>
|
|
<input type="text" name="funding_stage" class="form-control" placeholder="مثال: Seed، Series A" value="<?= $org ? $this->escape($org['funding_stage'] ?? '') : '' ?>">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">الوصف</label>
|
|
<textarea name="description" class="form-control" rows="4"><?= $org ? $this->escape($org['description'] ?? '') : '' ?></textarea>
|
|
</div>
|
|
|
|
<div style="display: flex; gap: 12px; margin-top: 20px;">
|
|
<button type="submit" class="btn btn-primary"><?= $org ? 'تحديث' : 'إنشاء' ?> المنظمة</button>
|
|
<a href="/admin/organizations" class="btn btn-secondary">إلغاء</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<style>
|
|
.form-stacked { display: flex; flex-direction: column; gap: 16px; }
|
|
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
|
|
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
|
|
</style>
|