744 lines
48 KiB
PHP
Executable File
744 lines
48 KiB
PHP
Executable File
<?php
|
|
|
|
use Twig\Environment;
|
|
use Twig\Error\LoaderError;
|
|
use Twig\Error\RuntimeError;
|
|
use Twig\Extension\CoreExtension;
|
|
use Twig\Extension\SandboxExtension;
|
|
use Twig\Markup;
|
|
use Twig\Sandbox\SecurityError;
|
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
|
use Twig\Source;
|
|
use Twig\Template;
|
|
use Twig\TemplateWrapper;
|
|
|
|
/* company/views/admin/form.twig */
|
|
class __TwigTemplate_a32b59f8438891012ef9b918fd0ec07b extends Template
|
|
{
|
|
private Source $source;
|
|
/**
|
|
* @var array<string, Template>
|
|
*/
|
|
private array $macros = [];
|
|
|
|
public function __construct(Environment $env)
|
|
{
|
|
parent::__construct($env);
|
|
|
|
$this->source = $this->getSourceContext();
|
|
|
|
$this->blocks = [
|
|
'title' => [$this, 'block_title'],
|
|
'content' => [$this, 'block_content'],
|
|
'scripts' => [$this, 'block_scripts'],
|
|
];
|
|
}
|
|
|
|
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
|
|
{
|
|
// line 1
|
|
return "layouts/dashboard.twig";
|
|
}
|
|
|
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
$this->parent = $this->load("layouts/dashboard.twig", 1);
|
|
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
|
|
}
|
|
|
|
// line 3
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_title(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
|
yield " - ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["platformName"] ?? null), "html", null, true);
|
|
yield from [];
|
|
}
|
|
|
|
// line 5
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_content(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 6
|
|
yield "<div class=\"container-fluid px-4\">
|
|
<h1 class=\"mt-4\">";
|
|
// line 7
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
|
yield "</h1>
|
|
<ol class=\"breadcrumb mb-4\">
|
|
<li class=\"breadcrumb-item\"><a href=\"";
|
|
// line 9
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("admin/dashboard"), "html", null, true);
|
|
yield "\">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("dashboard.dashboard"), "html", null, true);
|
|
yield "</a></li>
|
|
<li class=\"breadcrumb-item\"><a href=\"";
|
|
// line 10
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("admin/companies"), "html", null, true);
|
|
yield "\">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.title"), "html", null, true);
|
|
yield "</a></li>
|
|
<li class=\"breadcrumb-item active\">";
|
|
// line 11
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.edit_title"), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.create_title"), "html", null, true)));
|
|
yield "</li>
|
|
</ol>
|
|
|
|
<div class=\"card mb-4\">
|
|
<div class=\"card-header\">
|
|
<i class=\"bi bi-building me-1\"></i>
|
|
";
|
|
// line 17
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.details_title"), "html", null, true);
|
|
yield "
|
|
</div>
|
|
<div class=\"card-body\">
|
|
";
|
|
// line 20
|
|
if ((($tmp = ($context["error"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 21
|
|
yield " <div class=\"alert alert-danger\" role=\"alert\">
|
|
";
|
|
// line 22
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["error"] ?? null), "html", null, true);
|
|
yield "
|
|
</div>
|
|
";
|
|
}
|
|
// line 25
|
|
yield " <form action=\"";
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("admin/companies/" . CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_id", [], "any", false, false, false, 25))), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("admin/companies"), "html", null, true)));
|
|
yield "\" method=\"POST\" enctype=\"multipart/form-data\">
|
|
";
|
|
// line 26
|
|
if ((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 27
|
|
yield " <input type=\"hidden\" name=\"_method\" value=\"PUT\">
|
|
";
|
|
}
|
|
// line 29
|
|
yield " ";
|
|
yield $this->env->getFunction('csrf_field')->getCallable()();
|
|
yield "
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"name\" class=\"form-label\">";
|
|
// line 32
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.company_name"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\" value=\"";
|
|
// line 33
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_name", [], "any", false, false, false, 33), "html", null, true)) : (""));
|
|
yield "\" required>
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"email\" class=\"form-label\">";
|
|
// line 37
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.email"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"email\" class=\"form-control\" id=\"email\" name=\"email\" value=\"";
|
|
// line 38
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_email", [], "any", false, false, false, 38), "html", null, true)) : (""));
|
|
yield "\" required>
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"description\" class=\"form-label\">";
|
|
// line 42
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.description"), "html", null, true);
|
|
yield "</label>
|
|
<div id=\"quill-editor\" style=\"height: 300px;\" data-target=\"description\">";
|
|
// line 43
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_description", [], "any", false, false, false, 43)) : (""));
|
|
yield "</div>
|
|
<textarea class=\"form-control\" id=\"description\" name=\"description\" style=\"display:none\">";
|
|
// line 44
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_description", [], "any", false, false, false, 44), "html", null, true)) : (""));
|
|
yield "</textarea>
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"phone\" class=\"form-label\">";
|
|
// line 48
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.phone"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"phone\" name=\"phone\" value=\"";
|
|
// line 49
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_phone", [], "any", false, false, false, 49), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"website\" class=\"form-label\">";
|
|
// line 53
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.website"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"url\" class=\"form-control\" id=\"website\" name=\"website\" value=\"";
|
|
// line 54
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_website", [], "any", false, false, false, 54), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"tax_id\" class=\"form-label\">";
|
|
// line 58
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.tax_id"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"tax_id\" name=\"tax_id\" value=\"";
|
|
// line 59
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_tax_id", [], "any", false, false, false, 59), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"bus_type\" class=\"form-label\">";
|
|
// line 63
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.business_type"), "html", null, true);
|
|
yield "</label>
|
|
<select class=\"form-select\" id=\"bus_type\" name=\"bus_type\">
|
|
<option value=\"individual\" ";
|
|
// line 65
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_type", [], "any", false, false, false, 65) == "individual"))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.individual"), "html", null, true);
|
|
yield "</option>
|
|
<option value=\"business\" ";
|
|
// line 66
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_type", [], "any", false, false, false, 66) == "business"))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.business"), "html", null, true);
|
|
yield "</option>
|
|
<option value=\"nonprofit\" ";
|
|
// line 67
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_type", [], "any", false, false, false, 67) == "nonprofit"))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.nonprofit"), "html", null, true);
|
|
yield "</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"status\" class=\"form-label\">";
|
|
// line 72
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.status"), "html", null, true);
|
|
yield "</label>
|
|
<select class=\"form-select\" id=\"status\" name=\"status\">
|
|
<option value=\"active\" ";
|
|
// line 74
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_status", [], "any", false, false, false, 74) == "active"))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.active"), "html", null, true);
|
|
yield "</option>
|
|
<option value=\"inactive\" ";
|
|
// line 75
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_status", [], "any", false, false, false, 75) == "inactive"))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.inactive"), "html", null, true);
|
|
yield "</option>
|
|
</select>
|
|
</div>
|
|
|
|
";
|
|
// line 79
|
|
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "isSuperAdmin", [], "method", false, false, false, 79) || (($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_id", [], "any", false, false, false, 79) == 1)))) {
|
|
// line 80
|
|
yield " <div class=\"card mb-3 border-warning\">
|
|
<div class=\"card-header bg-warning text-dark\">
|
|
<i class=\"bi bi-globe me-1\"></i> ";
|
|
// line 82
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.platform_config_title"), "html", null, true);
|
|
yield "
|
|
</div>
|
|
<div class=\"card-body\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"platform_name\" class=\"form-label\">";
|
|
// line 86
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.platform_name"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"platform_name\" name=\"platform_name\" value=\"";
|
|
// line 87
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "platform_name", [], "any", false, false, false, 87), "html", null, true)) : (""));
|
|
yield "\" placeholder=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.platform_name_placeholder"), "html", null, true);
|
|
yield "\">
|
|
<div class=\"form-text\">";
|
|
// line 88
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.platform_name_help"), "html", null, true);
|
|
yield "</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
";
|
|
}
|
|
// line 93
|
|
yield "
|
|
<div class=\"card mb-4 border-primary\">
|
|
<div class=\"card-header bg-primary text-white\">
|
|
<i class=\"bi bi-robot me-1\"></i> ";
|
|
// line 96
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.ai_agent_config_title"), "html", null, true);
|
|
yield "
|
|
</div>
|
|
<div class=\"card-body\">
|
|
<div class=\"row\">
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"ai_provider\" class=\"form-label\">";
|
|
// line 102
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.ai_provider"), "html", null, true);
|
|
yield "</label>
|
|
<select class=\"form-select\" id=\"ai_provider\" name=\"ai_provider\">
|
|
<option value=\"openrouter\" ";
|
|
// line 104
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_provider", [], "any", false, false, false, 104) == "openrouter"))) ? ("selected") : (""));
|
|
yield ">OpenRouter (";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.recommended"), "html", null, true);
|
|
yield ")</option>
|
|
<option value=\"openai\" ";
|
|
// line 105
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_provider", [], "any", false, false, false, 105) == "openai"))) ? ("selected") : (""));
|
|
yield ">OpenAI (Direct)</option>
|
|
<option value=\"gemini\" ";
|
|
// line 106
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_provider", [], "any", false, false, false, 106) == "gemini"))) ? ("selected") : (""));
|
|
yield ">Google Gemini (Direct)</option>
|
|
<option value=\"zai\" ";
|
|
// line 107
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_provider", [], "any", false, false, false, 107) == "zai"))) ? ("selected") : (""));
|
|
yield ">Z.ai (Direct)</option>
|
|
<option value=\"ollama\" ";
|
|
// line 108
|
|
yield (((($context["target_company"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_provider", [], "any", false, false, false, 108) == "ollama"))) ? ("selected") : (""));
|
|
yield ">Ollama (Local)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"ai_model\" class=\"form-label\">";
|
|
// line 114
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.ai_model"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"ai_model\" name=\"ai_model\" value=\"";
|
|
// line 115
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_model", [], "any", false, false, false, 115), "html", null, true)) : ("google/gemini-2.0-flash-001"));
|
|
yield "\" placeholder=\"ex: stepfun/step-3.5-flash:free\">
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"ai_endpoint\" class=\"form-label\">";
|
|
// line 120
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.ai_endpoint"), "html", null, true);
|
|
yield " (";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.optional"), "html", null, true);
|
|
yield ")</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"ai_endpoint\" name=\"ai_endpoint\" value=\"";
|
|
// line 121
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "ai_endpoint", [], "any", false, false, false, 121), "html", null, true)) : (""));
|
|
yield "\" placeholder=\"http://localhost:11434/v1\">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"mb-0\">
|
|
<label for=\"openrouter_api_key\" class=\"form-label\">";
|
|
// line 126
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.api_key_secret"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"password\" class=\"form-control\" id=\"openrouter_api_key\" name=\"openrouter_api_key\" value=\"";
|
|
// line 127
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "openrouter_api_key", [], "any", false, false, false, 127), "html", null, true)) : (""));
|
|
yield "\" placeholder=\"sk-...\">
|
|
<div class=\"form-text\">";
|
|
// line 128
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.api_key_help"), "html", null, true);
|
|
yield "</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"address\" class=\"form-label\">";
|
|
// line 136
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.address"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"address\" name=\"address\" value=\"";
|
|
// line 137
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_address", [], "any", false, false, false, 137), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-6\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"city\" class=\"form-label\">";
|
|
// line 142
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.city"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"city\" name=\"city\" value=\"";
|
|
// line 143
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_city", [], "any", false, false, false, 143), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class=\"row\">
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"state\" class=\"form-label\">";
|
|
// line 151
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.state"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"state\" name=\"state\" value=\"";
|
|
// line 152
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_state", [], "any", false, false, false, 152), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"country\" class=\"form-label\">";
|
|
// line 157
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.country"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"country\" name=\"country\" value=\"";
|
|
// line 158
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_country", [], "any", false, false, false, 158), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-4\">
|
|
<div class=\"mb-3\">
|
|
<label for=\"postal_code\" class=\"form-label\">";
|
|
// line 163
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.postal_code"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"text\" class=\"form-control\" id=\"postal_code\" name=\"postal_code\" value=\"";
|
|
// line 164
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_postal_code", [], "any", false, false, false, 164), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
";
|
|
// line 169
|
|
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "isSuperAdmin", [], "method", false, false, false, 169)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 170
|
|
yield " <div class=\"card mb-3\">
|
|
<div class=\"card-header\">
|
|
";
|
|
// line 172
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.module_visibility_title"), "html", null, true);
|
|
yield "
|
|
</div>
|
|
<div class=\"card-body\">
|
|
";
|
|
// line 175
|
|
if ((($tmp = ($context["modules"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 176
|
|
yield " <div class=\"table-responsive\">
|
|
<table class=\"table table-bordered table-striped\">
|
|
<thead>
|
|
<tr>
|
|
<th>";
|
|
// line 180
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.module_header"), "html", null, true);
|
|
yield "</th>
|
|
<th class=\"text-center\">";
|
|
// line 181
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.enabled_header"), "html", null, true);
|
|
yield "</th>
|
|
<th class=\"text-center\">";
|
|
// line 182
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.public_navbar_header"), "html", null, true);
|
|
yield "</th>
|
|
<th class=\"text-center\">";
|
|
// line 183
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.dashboard_navbar_header"), "html", null, true);
|
|
yield "</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
";
|
|
// line 187
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = CoreExtension::ensureTraversable(($context["modules"] ?? null));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
|
|
// line 188
|
|
yield " ";
|
|
$context["isEnabled"] = false;
|
|
// line 189
|
|
yield " ";
|
|
$context["showPublic"] = true;
|
|
// line 190
|
|
yield " ";
|
|
$context["showDashboard"] = true;
|
|
// line 191
|
|
yield "
|
|
";
|
|
// line 192
|
|
if ((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 193
|
|
yield " ";
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "modules", [], "any", false, false, false, 193));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["cm"]) {
|
|
// line 194
|
|
yield " ";
|
|
if ((CoreExtension::getAttribute($this->env, $this->source, $context["cm"], "modules_id", [], "any", false, false, false, 194) == CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 194))) {
|
|
// line 195
|
|
yield " ";
|
|
$context["isEnabled"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["cm"], "pivot", [], "any", false, false, false, 195), "bus_modules_is_enabled", [], "any", false, false, false, 195);
|
|
// line 196
|
|
yield " ";
|
|
$context["showPublic"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["cm"], "pivot", [], "any", false, false, false, 196), "bus_modules_show_public_nav", [], "any", false, false, false, 196);
|
|
// line 197
|
|
yield " ";
|
|
$context["showDashboard"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["cm"], "pivot", [], "any", false, false, false, 197), "bus_modules_show_dashboard_nav", [], "any", false, false, false, 197);
|
|
// line 198
|
|
yield " ";
|
|
}
|
|
// line 199
|
|
yield " ";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_key'], $context['cm'], $context['_parent']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 200
|
|
yield " ";
|
|
}
|
|
// line 201
|
|
yield "
|
|
<tr>
|
|
<td>
|
|
<input type=\"hidden\" name=\"modules[";
|
|
// line 204
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 204), "html", null, true);
|
|
yield "][present]\" value=\"1\">
|
|
<strong>";
|
|
// line 205
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_display_name", [], "any", false, false, false, 205), "html", null, true);
|
|
yield "</strong>
|
|
<small class=\"d-block text-muted\">";
|
|
// line 206
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_description", [], "any", false, false, false, 206), "html", null, true);
|
|
yield "</small>
|
|
</td>
|
|
<td class=\"text-center\">
|
|
<div class=\"form-check d-inline-block\">
|
|
<input class=\"form-check-input\" type=\"checkbox\" name=\"modules[";
|
|
// line 210
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 210), "html", null, true);
|
|
yield "][enabled]\" id=\"module_enabled_";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 210), "html", null, true);
|
|
yield "\" ";
|
|
yield (((($tmp = ($context["isEnabled"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("checked") : (""));
|
|
yield ">
|
|
</div>
|
|
</td>
|
|
<td class=\"text-center\">
|
|
<div class=\"form-check d-inline-block\">
|
|
<input class=\"form-check-input\" type=\"checkbox\" name=\"modules[";
|
|
// line 215
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 215), "html", null, true);
|
|
yield "][public]\" id=\"module_public_";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 215), "html", null, true);
|
|
yield "\" ";
|
|
yield (((($tmp = ($context["showPublic"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("checked") : (""));
|
|
yield ">
|
|
</div>
|
|
</td>
|
|
<td class=\"text-center\">
|
|
<div class=\"form-check d-inline-block\">
|
|
<input class=\"form-check-input\" type=\"checkbox\" name=\"modules[";
|
|
// line 220
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 220), "html", null, true);
|
|
yield "][dashboard]\" id=\"module_dashboard_";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["module"], "modules_id", [], "any", false, false, false, 220), "html", null, true);
|
|
yield "\" ";
|
|
yield (((($tmp = ($context["showDashboard"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("checked") : (""));
|
|
yield ">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_key'], $context['module'], $context['_parent']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 225
|
|
yield " </tbody>
|
|
</table>
|
|
</div>
|
|
";
|
|
} else {
|
|
// line 229
|
|
yield " <p class=\"text-muted mb-0\">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.no_active_modules"), "html", null, true);
|
|
yield "</p>
|
|
";
|
|
}
|
|
// line 231
|
|
yield " </div>
|
|
</div>
|
|
";
|
|
}
|
|
// line 234
|
|
yield "
|
|
<div class=\"mb-3\">
|
|
<label for=\"logo\" class=\"form-label\">";
|
|
// line 236
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.logo"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"file\" class=\"form-control\" id=\"logo\" name=\"logo\" accept=\"image/*\">
|
|
<div id=\"logoPreview\" class=\"mt-2\"></div>
|
|
";
|
|
// line 239
|
|
if ((($context["target_company"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_logo", [], "any", false, false, false, 239))) {
|
|
// line 240
|
|
yield " <div class=\"mt-2\">
|
|
<small class=\"form-text text-muted\">";
|
|
// line 241
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.current_logo"), "html", null, true);
|
|
yield "</small>
|
|
<img src=\"";
|
|
// line 242
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "logo_url", [], "any", false, false, false, 242), "html", null, true);
|
|
yield "\" alt=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.alt_logo"), "html", null, true);
|
|
yield "\" class=\"img-thumbnail\" style=\"max-height: 100px;\">
|
|
</div>
|
|
";
|
|
}
|
|
// line 245
|
|
yield " </div>
|
|
|
|
<div class=\"mb-3\">
|
|
<label for=\"business_card\" class=\"form-label\">";
|
|
// line 248
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.business_card"), "html", null, true);
|
|
yield "</label>
|
|
<input type=\"file\" class=\"form-control\" id=\"business_card\" name=\"business_card\" accept=\"image/*\">
|
|
<div id=\"businessCardPreview\" class=\"mt-2\"></div>
|
|
";
|
|
// line 251
|
|
if ((($context["target_company"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "bus_business_card", [], "any", false, false, false, 251))) {
|
|
// line 252
|
|
yield " <div class=\"mt-2\">
|
|
<small class=\"form-text text-muted\">";
|
|
// line 253
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.current_business_card"), "html", null, true);
|
|
yield "</small>
|
|
<img src=\"";
|
|
// line 254
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["target_company"] ?? null), "business_card_url", [], "any", false, false, false, 254), "html", null, true);
|
|
yield "\" alt=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.alt_business_card"), "html", null, true);
|
|
yield "\" class=\"img-thumbnail\" style=\"max-height: 100px;\">
|
|
</div>
|
|
";
|
|
}
|
|
// line 257
|
|
yield " </div>
|
|
|
|
<div class=\"mt-4 border-top pt-3\">
|
|
<button type=\"submit\" class=\"btn btn-primary\"><i class=\"bi bi-save me-1\"></i> ";
|
|
// line 260
|
|
yield (((($tmp = ($context["target_company"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.update_button"), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.create_button"), "html", null, true)));
|
|
yield "</button>
|
|
<a href=\"";
|
|
// line 261
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("admin/companies"), "html", null, true);
|
|
yield "\" class=\"btn btn-secondary\"><i class=\"bi bi-x-lg me-1\"></i> ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("company.cancel"), "html", null, true);
|
|
yield "</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
";
|
|
yield from [];
|
|
}
|
|
|
|
// line 269
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_scripts(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 270
|
|
yield "<script>
|
|
// Logo Preview
|
|
document.getElementById('logo').addEventListener('change', function(e) {
|
|
const file = e.target.files[0];
|
|
if (file) {
|
|
const reader = new FileReader();
|
|
reader.onload = function(e) {
|
|
document.getElementById('logoPreview').innerHTML = `<img src=\"\${e.target.result}\" class=\"img-thumbnail\" style=\"max-height: 100px;\">`;
|
|
}
|
|
reader.readAsDataURL(file);
|
|
}
|
|
});
|
|
|
|
// Business Card Preview
|
|
document.getElementById('business_card').addEventListener('change', function(e) {
|
|
const file = e.target.files[0];
|
|
if (file) {
|
|
const reader = new FileReader();
|
|
reader.onload = function(e) {
|
|
document.getElementById('businessCardPreview').innerHTML = `<img src=\"\${e.target.result}\" class=\"img-thumbnail\" style=\"max-height: 100px;\">`;
|
|
}
|
|
reader.readAsDataURL(file);
|
|
}
|
|
});
|
|
</script>
|
|
";
|
|
yield from [];
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getTemplateName(): string
|
|
{
|
|
return "company/views/admin/form.twig";
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function isTraitable(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getDebugInfo(): array
|
|
{
|
|
return array ( 686 => 270, 679 => 269, 665 => 261, 661 => 260, 656 => 257, 648 => 254, 644 => 253, 641 => 252, 639 => 251, 633 => 248, 628 => 245, 620 => 242, 616 => 241, 613 => 240, 611 => 239, 605 => 236, 601 => 234, 596 => 231, 590 => 229, 584 => 225, 569 => 220, 557 => 215, 545 => 210, 538 => 206, 534 => 205, 530 => 204, 525 => 201, 522 => 200, 516 => 199, 513 => 198, 510 => 197, 507 => 196, 504 => 195, 501 => 194, 496 => 193, 494 => 192, 491 => 191, 488 => 190, 485 => 189, 482 => 188, 478 => 187, 471 => 183, 467 => 182, 463 => 181, 459 => 180, 453 => 176, 451 => 175, 445 => 172, 441 => 170, 439 => 169, 431 => 164, 427 => 163, 419 => 158, 415 => 157, 407 => 152, 403 => 151, 392 => 143, 388 => 142, 380 => 137, 376 => 136, 365 => 128, 361 => 127, 357 => 126, 349 => 121, 343 => 120, 335 => 115, 331 => 114, 322 => 108, 318 => 107, 314 => 106, 310 => 105, 304 => 104, 299 => 102, 290 => 96, 285 => 93, 277 => 88, 271 => 87, 267 => 86, 260 => 82, 256 => 80, 254 => 79, 245 => 75, 239 => 74, 234 => 72, 224 => 67, 218 => 66, 212 => 65, 207 => 63, 200 => 59, 196 => 58, 189 => 54, 185 => 53, 178 => 49, 174 => 48, 167 => 44, 163 => 43, 159 => 42, 152 => 38, 148 => 37, 141 => 33, 137 => 32, 130 => 29, 126 => 27, 124 => 26, 119 => 25, 113 => 22, 110 => 21, 108 => 20, 102 => 17, 93 => 11, 87 => 10, 81 => 9, 76 => 7, 73 => 6, 66 => 5, 53 => 3, 42 => 1,);
|
|
}
|
|
|
|
public function getSourceContext(): Source
|
|
{
|
|
return new Source("", "company/views/admin/form.twig", "/app/modules/company/views/admin/form.twig");
|
|
}
|
|
}
|