|
|
|
|
@ -15,7 +15,7 @@ from .edit_forms import NameForm as CompNameForm, HomeForm as CompHomeForm, Phon |
|
|
|
|
EmailForm as CompEmailForm, WebPageForm as CompWebPageForm, SocialForm as CompSocialForm,\ |
|
|
|
|
TagForm as CompTagForm, DescriptionForm as CompDescr, StaffForm as CompStaff, \ |
|
|
|
|
FoundationForm as CompFound, SpecializationForm as CompSpec, AddressForm as CompAddress,\ |
|
|
|
|
LogoForm as CompLogo |
|
|
|
|
LogoForm as CompLogo, ThemeForm as CompThemeForm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CompanySearchView(ListView): |
|
|
|
|
@ -112,11 +112,17 @@ class MemberDetail(DetailView): |
|
|
|
|
'staff_form': CompStaff(instance=company), 'found_form': CompFound(instance=company), |
|
|
|
|
'logo_form': CompLogo(instance=company) |
|
|
|
|
} |
|
|
|
|
tags = [{'id': str(tag.id), 'text': tag.name } for tag in company.tag.all()] |
|
|
|
|
tags = [{'id': str(tag.id), 'text': tag.name, 'url': '/members/tag/%s/'%tag.url} for tag in company.tag.all()] |
|
|
|
|
tag_form = CompTagForm() |
|
|
|
|
tag_form.fields['tag'].widget.attrs['data-predifined'] = json.dumps(tags) |
|
|
|
|
tag_form.fields['tag'].widget.attrs['value'] = '' |
|
|
|
|
forms.update({'tag_form': tag_form}) |
|
|
|
|
|
|
|
|
|
#themes = [{'id': str(item.id), 'text': item.name } for item in company.theme.all()] |
|
|
|
|
theme_form = CompThemeForm(instance=company) |
|
|
|
|
|
|
|
|
|
#theme_form.fields['theme'].widget.attrs['data-predifined'] = json.dumps(themes) |
|
|
|
|
#theme_form.fields['tag'].widget.attrs['value'] = '' |
|
|
|
|
forms.update({'tag_form': tag_form, 'theme_form': theme_form}) |
|
|
|
|
|
|
|
|
|
lang = get_language() |
|
|
|
|
comp_transl = company.translations.get(language_code=lang) |
|
|
|
|
|