{% extends 'dashboard/base.html.twig' %} {% block title %}{{ action|capitalize }} User | TextBlast AI{% endblock %} {% block main %}
Users / Form

{{ action == 'u' ? 'Edit Profile' : 'New User' }}

{{ form_start(userForm, {'attr': {'class': 'space-y-8'}}) }} {% if not userForm.vars.valid %}
Please correct the highlighted errors below.
{{ form_errors(userForm) }}
{% endif %}
{{ form_widget(userForm.firstName, {'attr': {'placeholder': 'John', 'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all placeholder:text-slate-600'}}) }}
{{ form_errors(userForm.firstName) }}
{{ form_widget(userForm.lastName, {'attr': {'placeholder': 'Doe', 'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all placeholder:text-slate-600'}}) }}
{{ form_errors(userForm.lastName) }}
{{ form_widget(userForm.email, {'attr': {'placeholder': 'email@textblast.ai', 'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all placeholder:text-slate-600'}}) }}
{{ form_errors(userForm.email) }}
{{ form_widget(userForm.type, {'attr': {'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all appearance-none cursor-pointer'}}) }}
{% if action == 'edit' %} Leave blank to keep current password {% endif %}
{{ form_widget(userForm.password.first, {'attr': {'placeholder': 'New Password', 'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all placeholder:text-slate-600'}}) }}
{{ form_errors(userForm.password.first) }}
{{ form_widget(userForm.password.second, {'attr': {'placeholder': 'Confirm Password', 'class': 'w-full bg-slate-950/50 border border-white/10 rounded-xl px-5 py-4 text-white focus:ring-2 focus:ring-emerald-500/50 outline-none transition-all placeholder:text-slate-600'}}) }}
{% if action == 'u' %} {% endif %}
Discard Changes
{{ form_end(userForm) }}
{% endblock %}