<form action="index.php?module=settings&amp;event=OtherSettings" method="post" name="hm" id="hm-Settings-Other" enctype="multipart/form-data" class="form-horizontal form-label-left" >
    <input type="hidden" name="storeOtherSettings" value="1" />
    <input type="hidden" name="task" value="other" />
    <div class="row">
        <div class="col-12">
            <div class="card panel-info shadow-sm rounded">
                <div class="card-body">
                    <div class="btn-group">
                        <input type="reset" class="btn btn-outline-secondary" value="[% $user->gettext('Reset') %]" />
                        <input type="submit" class="btn btn-outline-secondary" value="[% $user->gettext('&Auml;nderungen speichern') %]" />
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class = "col-lg-6">
            <div class="card panel-info shadow-sm rounded">
                <div class="card-body">

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="OtherURL">[% $user->gettext('URL des Heinzelmanns') %]</label>
                        <div class="col-lg-7">
                            <div class="input-group">
                                <input type="text" name="Other[URL]" id="OtherURL" value="[% $smarty.const.HTTPURL %]" class="form-control" size="30" maxlength="255" />
                                <span class="input-group-text">
                                    <button class="btn btn-outline-secondary" type="button" onclick="javascript:loadQRCodeModal()"><img src="images/QRCode.png" width="18" height="18" alt="" /></button>
                                </span>
                            </div>
                        </div>
                    </div>
                                
                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label">[% $user->gettext('sso.php oder index.php in Ticket-URL beim Mailversand verwenden') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[UseSSOInURL]" value="0" [% if !$smarty.const.USESSOINURL  %]checked="checked"[% /if %] /> [% $user->gettext('index.php') %]
                            <input type="radio" name="Other[UseSSOInURL]" value="1" [% if $smarty.const.USESSOINURL  %]checked="checked"[% /if %] /> [% $user->gettext('sso.php') %]                                <span class="input-group-text">
                                
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="OtherUploadDir">[% $user->gettext('Pfad zum Uploadverzeichnis') %]</label>

                        <div class="col-lg-7">
                            [% if $UploadDirErr %]
                                <span class="error">[% $user->gettext('Der Pfad ist nicht beschreibbar. Es wird das Standard-Uploadverzeichnis verwendet.') %]</span>
                                <br />
                            [% /if %]
                            <input type="text" name="Other[UploadDir]" id="OtherUploadDir" value="[% $smarty.const._HM_UPLOAD %]" [% if $UploadDirErr %]class="form-control error"[% else %]class="form-control"[% /if %] size="30" maxlength="255" />
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[GroupUploadDir]">[% $user->gettext('Dateien im Uploadverzeichnis nach Jahren gruppieren') %]</label>

                        <div class="col-lg-7">
                            <input type="radio" name="Other[GroupUploadDir]" id="GroupUploadDir1" value="1" [% if $smarty.const.GROUPUPLOADDIR == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[GroupUploadDir]" id="GroupUploadDir2" value="0" [% if $smarty.const.GROUPUPLOADDIR != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">
                                [% $user->gettext('Wenn diese Einstellung aktiviert ist, werden die Dokumente im Upload-Verzeichnis in Unterverzeichnisen entsprechend des Jahres gruppiert.') %]
                                [% $user->gettext('Beim aktivieren der Einstellung werden bestehende Dokumente entsprechend einsortiert. Das kann je nach Menge der Dokumente einige Zeit dauern.') %]
                                [% $user->gettext('Wird die Einstellung deaktiviert, werden die Dateien wieder direkt in das Uploadverzeichnis verschoben.') %]
                            </span>

                            <div class="progress" id="progressDocuments" style="display: none">
                                <div class="progress-bar progress-bar-striped active" id="progressBarDocuments" role="progressbar" style="width:0%;">
                                </div>
                            </div>                            

                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="OtherUNCUploadPath">[% $user->gettext('UNC-Pfad zum Uploadverzeichnis') %]</label>
                        <div class="col-lg-7">
                            <input type="text" name="Other[UNCUploadPath]" id="OtherUNCUploadPath" value="[% $smarty.const.UNCUPLOADPATH %]" class="form-control" size="30" maxlength="300" />
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="OtherDefLang">[% $user->gettext('Standardsprache für neue Benutzer') %]</label>

                        <div class="col-lg-7">
                            <select size="1" id="OtherDefLang" name="Other[DefLang]" class="form-control">
                                <option value="de" [% if $smarty.const.DEFLANG == 'de' || $smarty.const.DEFLANG != 'en' %]selected="selected"[% /if %]>[% $user->gettext('deutsch') %]</option>
                                <option value="en" [% if $smarty.const.DEFLANG == 'en' %]selected="selected"[% /if %]>[% $user->gettext('englisch') %]</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="DefStartPage">[% $user->gettext('Standardseite nach Anmeldung') %]</label>

                        <div class="col-lg-7">
                            <select size="1" id="DefStartPage" name="Other[DefStartPage]" class="form-control">
                                <option value="start" [% if $smarty.const.DEFSTARTPAGE == 'start' || !$smarty.const.DEFSTARTPAGE %]selected="selected"[% /if %]>[% $user->gettext('Startseite') %]</option>
                                <option value="ticketlist" [% if $smarty.const.DEFSTARTPAGE == 'ticketlist' %]selected="selected"[% /if %]>[% $user->gettext('Ticketliste') %]</option>
                                <option value="ticketlist&MyTickets=1&StatusID=1" [% if $smarty.const.DEFSTARTPAGE == 'ticketlist&MyTickets=1&StatusID=1' %]selected="selected"[% /if %]>[% $user->gettext('Eigene offene Tickets') %]</option>
                                <option value="ticket&event=newTicket" [% if $smarty.const.DEFSTARTPAGE == 'ticket&event=newTicket' %]selected="selected"[% /if %]>[% $user->gettext('Neues Ticket') %]</option>
                                [% if $user->Security->Calendar %]
                                    <option value="calendar" [% if $smarty.const.DEFSTARTPAGE == 'calendar' %]selected="selected"[% /if %]>[% $user->gettext('Kalender') %]</option>
                                [% /if %]
                            </select>
                        </div>
                    </div>
                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="DefStartPage">[% $user->gettext('Anmeldeformular ausblenden') %]</label>

                        <div class="col-lg-7">
                            <input type="radio" name="Other[HideLogin]" value="1" [% if $smarty.const.HIDELOGIN == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[HideLogin]" value="0" [% if $smarty.const.HIDELOGIN != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Wenn Sie nur die Anmeldung über das Mircosoft-Konto anzeigen möchten, können Sie das Standard-Anmeldeformular ausblenden.') %]</span>
                        </div>
                    </div>


                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label">[% $user->gettext('Zus&auml;tzlichen Status DONE aktivieren') %]</label>

                        <div class="col-lg-7">
                            <input type="radio" name="Other[StatusDoneActive]" value="1" [% if $smarty.const.STATUSDONEACTIVE == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[StatusDoneActive]" value="0" [% if $smarty.const.STATUSDONEACTIVE != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label">[% $user->gettext('Zus&auml;tzlichen Status NEW aktivieren') %]</label>

                        <div class="col-lg-7">
                            <input type="radio" name="Other[StatusNewActive]" value="1" [% if $smarty.const.STATUSNEWACTIVE == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[StatusNewActive]" value="0" [% if $smarty.const.STATUSNEWACTIVE != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[KBshowRating]">[% $user->gettext('Knowledgebase: Bewertungen anzeigen?') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[KBshowRating]" value="1" [% if $smarty.const.KBSHOWRATINGS == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[KBshowRating]" value="0" [% if $smarty.const.KBSHOWRATINGS != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>
                         <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[UseDocumentTree]">[% $user->gettext('Dokumentbaum anstelle des normalen Dokumenten-Panel im Projekt verwenden') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[UseDocumentTree]" value="1" [% if $smarty.const.USEDOCUMENTTREE == 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[UseDocumentTree]" value="0" [% if $smarty.const.USEDOCUMENTTREE != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-5 control-label" for="Other[NotifyTimeout]">[% $user->gettext('Anzeigedauer der Rückmeldungen in Millisekunden') %]</label>
                        <div class="col-lg-7">
                            <input type="number" name="Other[NotifyTimeout]" id="OtherNotifyTimeout" value="[% $smarty.const.NOTIFYTIMEOUT|default:5000 %]" class="form-control" size="25" maxlength="6" /> 
                </div>
            </div>
            </div>
        </div>

            <div class="card panel-info shadow-sm rounded mt-4">
                <div class="card-body">

                        <div class="form-group row mb-3">
                                <label class="col-lg-5 control-label" for="FAQDefaultTags">[% $user->gettext('Standard Schlagworte bei Erstellung von Knowledgebase-Beiträgen') %]</label>
                                <div class="col-lg-7">
                                    <input type="text" name="Other[DefautTags]" id="FAQDefaultTags" class="form-control" value="[% $smarty.const.DEFAULTTAGS %]" /> 
                                </div>
                            </div>
                            <div class="form-group row mb-3">
                                <label class="col-lg-5 control-label" for="FAQCategories">[% $user->gettext('Standard Rubriken bei Erstellung von Knowledgebase-Beiträgen') %]</label>
                                <div class="col-lg-7">
                                    <select class="form-control select2" name="Other[DefaultFAQCategories][]" id="FAQCategories" multiple="multiple" data-actions-box="true" style="width:100%;">
                                        [% foreach from=$FAQCategories item=category %]
                                                <option value="[% $category->FAQCategoryID %]" 
                                                [% if $Tools->FCS_InArray($category->FAQCategoryID, (array) $DefaultFAQCategories) %]selected="selected"[% /if %]>[% $category->Name %]</option>
                                        [% /foreach %]
                                    </select>
                                </div>
                            </div>

                            <div class="form-group row mb-3">
                                <label class="col-lg-5 control-label" for="FAQDefaultGroups">[% $user->gettext('Standard "Sichtbar Für" bei Erstellung von Knowledgebase-Beiträgen') %]</label>
                                <div class="col-lg-7">
                                    <select class="form-control select2" name="Other[DefaultFAQGroups][]" id="FAQDefaultGroups" multiple="multiple" data-actions-box="true" style="width:100%;">
                                        <option value="0" [% if $Tools->FCS_InArray(0, (array) $DefaultFAQGroups) %]selected [% /if %]>-- [% $user->gettext('Unangemeldete Benutzer') %] -</option>
                                        [% foreach from=$Groups item=group %]
                                            <option value="[% $group.group_id %]" [% if $Tools->FCS_InArray($group.group_id , (array) $DefaultFAQGroups) %]selected="selected"[% /if %]>[% $user->gettext($group.name) %]</option>
                                        [% /foreach %]
                                    </select>
                                </div>
                            </div>

                    </div>

                </div>

            <div class="card panel-info shadow-sm rounded mt-4">
                <div class="card-header">
                    <h3 class="card-title">[% $user->gettext('Whitelist aktuell erlaubter Dateitypen beim Dokumentenupload') %]</h3>
                </div>
                <div class="card-body">
                    
                    <p>
                        [% $user->gettext('Aktuell erlaubt sind folgende MIME-Typen:') %]
                        <span class="help-block">[% $defaultMimeTypesAsString %]</span></p>
                    
                            <div class="form-group row mb-3">
                                <label class="col-lg-5 control-label" for="additionalAllowedMimeTypes">[% $user->gettext('Weitere erlaubte Dateitypen zufügen') %]
                                <br/>
                                <small class="help-block text-muted">[% $user->gettext('Weitere MIME-Typen bitte zeilenweise im Format type/subtype (z. B. image/jpeg) eingeben.') %]</small>
                                </label>
                                <div class="col-lg-7">
                                    
                                    <textarea id="additionalAllowedMimeTypes" class="form-control" name="Other[additionalAllowedMimeTypes]" style="width:100%;height:10em">[% $additionalAllowedMimeTypesAsString %]</textarea>
                                </div>                                
                            </div>



                    </div>

                </div>
            </div>

        <div class = "col-lg-6">

            <div class="card panel-info shadow-sm rounded">
                <div class="card-body">

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[SessionDesire]">
                            [% $user->gettext('Ablauf der Session bei Inaktivität') %]
                        </label>
                        <div class="col-lg-7">
                            <input type="number" min="0" size="3" name="Other[SessionDesire]" value="[% if $smarty.const.SESSIONDESIRE != 'SESSIONDESIRE' || $smarty.const.SESSIONDESIRE === 0 %][% $smarty.const.SESSIONDESIRE %][% else %]30[% /if %]" /> [% $user->gettext('Minuten') %]
                            <span class="help-block">[% $user->gettext('Dauer der Inaktivität, bis ein Benutzer automatisch abgemeldet wird. 0 bedeutet, dass der Benutzer nicht automatisch ausgeloggt wird.') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[ShowMessages]" >[% $user->gettext('Benachrichtigungen anzeigen') %]</label>

                        <div class="col-lg-7">
                            <input type="radio" name="Other[ShowMessages]" value="1" [% if $smarty.const.SHOWMESSAGES === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[ShowMessages]" value="0" [% if $smarty.const.SHOWMESSAGES === 0 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>



                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[RDPFile]">[% $user->gettext('Fernwartungssoftware') %]</label>
                        <div class="col-lg-7">
                            [% if $RDPFiles %]
                                <ul>
                                    [% foreach from=$RDPFiles item=RDPFile %]
                                        <li>
                                            [% $RDPFile.filename %]
                                        </li>
                                    [% /foreach %]
                                </ul>
                                <a href="index.php?module=settings&amp;event=deleterdp"><span class="button button-green">[% $user->gettext('Löschen') %]</span></a>
                                [% else %]
                                <input type="file"  name="RDPFile" />
                            [% /if %]
                            <span class="help-block">[% $user->gettext('Eine hier hochgeladene Datei kann von anderen Benutzern heruntergeladen werden.') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[PrintSize]">[% $user->gettext('Druckgröße') %]</label>
                        <div class="col-lg-7">
                            <input type="number" min="1" size="3" name="Other[PrintSize]" value="[% if $smarty.const.PRINTSIZE != 'PRINTSIZE' || $smarty.const.PRINTSIZE === 0 %][% $smarty.const.PRINTSIZE %][% else %]16[% /if %]" /> [% $user->gettext('pt') %]
                            <span class="help-block">[% $user->gettext('Druckgröße der Standardtexte beim Ticketdruck') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[DONTCHECKVERSION]" >[% $user->gettext('Verfügbare Heinzelmann-Version abrufen') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[DONTCHECKVERSION]" value="0" [% if $smarty.const.DONTCHECKVERSION === 0 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[DONTCHECKVERSION]" value="1" [% if $smarty.const.DONTCHECKVERSION === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="TAPIFilter">[% $user->gettext('TAPI Rufnummern Ergänzung') %]</label>
                        <div class="col-lg-7">
                            <input type="text" name="Other[TAPIFilter]" id="TAPIFilter" value='[% $TAPIFilter %]' class="form-control" size="30" maxlength="300" />
                            <span class="help-block">[% $user->gettext('Mehrere Nummern kommagetrennt und in Anführungszeichen eingeben - Bei eingehenden Anrufen werden die in den Kontakten definierten Nummern um die hier definierten Zeichenfolgen gekürzt geprüft. ') %]</span>
                        </div>
                    </div>


                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="CurrencyDefinition" >[% $user->gettext('W&auml;hrung definieren') %]</label>

                        <div class="col-lg-7">
                            <select size="1" name="Other[CurrencyDefinition]" id="CurrencyDefinition" class="form-control">
                                <option value="EUR" [% if $smarty.const.CURRENCYDEFINITION == 'EUR' || !$smarty.const.CURRENCYDEFINITION %]selected="selected"[% /if %]>[% $user->gettext('EUR (&euro;)') %]</option>
                                <option value="CHF" [% if $smarty.const.CURRENCYDEFINITION == 'CHF' %]selected="selected"[% /if %]>[% $user->gettext('CHF') %]</option>
                                <option value="USD" [% if $smarty.const.CURRENCYDEFINITION == 'USD' %]selected="selected"[% /if %]>[% $user->gettext('USD (&#36;)') %]</option>
                            </select>
                            <span class="help-block">[% $user->gettext('Definiert, welches Währungssymbol im Heinzelmann angezeigt wird.') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[WFInitiatorIsAdmin]" >[% $user->gettext('Workflow-Initiator ist Verwalter') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[WFInitiatorIsAdmin]" value="1" [% if $smarty.const.WFINITIATORISADMIN === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[WFInitiatorIsAdmin]" value="0" [% if $smarty.const.WFINITIATORISADMIN === 0 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Der Initiator eines Workflows sieht alle Aktivitäten in der Ticketliste und ist berechtigt, den Workflow abzubrechen.') %]</span>
                        </div>
                    </div>

                    [% if $smarty.const.ASSETDESK && 1 == $smarty.const.ASSETDESK %]

                        <div class="form-group row mb-3">
                            <label class="col-lg-5 control-label" for="Other[GERAETEMITANMELDENAMEN]" >[% $user->gettext('Gerätesuche des Kontaktes mit Anmeldenamen') %]</label>
                            <div class="col-lg-7">
                                <input type="radio" name="Other[GERAETEMITANMELDENAMEN]" value="1" [% if $smarty.const.GERAETEMITANMELDENAMEN === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                                <input type="radio" name="Other[GERAETEMITANMELDENAMEN]" value="0" [% if $smarty.const.GERAETEMITANMELDENAMEN != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                                <span class="help-block">[% $user->gettext('Bei der Gerätesuche für den Kontakt werden neben den zugewiesenen Geräten auch jene berücksichtigt, auf denen der verknüpfte Benutzer angemeldet ist.') %]</span>
                            </div>
                        </div>
                    [% /if %]

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[MANDANTEN]" >[% $user->gettext('Mandanten schränken Sichtbarkeit ein') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[MANDANTEN]" value="1" [% if $smarty.const.MANDANTEN === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[MANDANTEN]" value="0" [% if $smarty.const.MANDANTEN != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Benutzern werden nur Tickets und Kontakte angezeigt, deren Mandanten der Benutzer durch seine Gruppen zugeordnet ist.') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[MANDANTENCONTACT]" >[% $user->gettext('Ticketkontakte auch von nicht zugewiesenen Mandanten wählbar') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[MANDANTENCONTACT]" value="0" [% if $smarty.const.MANDANTENCONTACT === 0 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[MANDANTENCONTACT]" value="1" [% if $smarty.const.MANDANTENCONTACT != 0 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Trotz eingeschränkter Sichtbarkeit können im Ticket noch Kontakte anderer Mandanten zugewiesen werden.') %]</span>
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[SHOWCHART]" >[% $user->gettext('Tortendiagramme  auf Startseite anzeigen') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[SHOWCHART]" value="1" [% if $smarty.const.SHOWCHART === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[SHOWCHART]" value="0" [% if $smarty.const.SHOWCHART != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>

                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[SHOWCHART]" >[% $user->gettext('Bewertung auf Startseite anzeigen') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[SHOWRATING]" value="1" [% if $smarty.const.SHOWRATING === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[SHOWRATING]" value="0" [% if $smarty.const.SHOWRATING != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                        </div>
                    </div>
                    [% *
                    <div class="form-group row mb-3">
                    <label class="col-lg-5 control-label" for="Other[ARCHIVENUMBER]">[% $user->gettext('Anzahl der archivierten Knowledgebase-Beiträge') %]</label>
                    <div class="col-lg-7">
                    <input type="number" min="1" size="3" name="Other[ARCHIVENUMBER]" value="[% if $smarty.const.ARCHIVENUMBER > 0 %][% $smarty.const.ARCHIVENUMBER %][% else %]0[% /if %]" /> [% $user->gettext('Beiträge') %]
                    <span class="help-block">[% $user->gettext('Nächstes Mal wenn Sie einen Knowledgebase-Beitrag editieren, werden die ältere Versionen aus der Datenbank gelöscht') %]</span>
                    </div>
                    </div>
                    *%]
                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[HISTORY]">[% $user->gettext('Protokollierung aktivieren (Historie)') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[HISTORY]" value="1" [% if $smarty.const.HISTORY === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[HISTORY]" value="0" [% if $smarty.const.HISTORY != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Wenn diese Funktion aktiv ist, werden Änderungen in den Einstellungen, Gruppen, Benutzern, Kontakten, Projekten, Kategorien und der Knowledgebase protokolliert und können unter Verwaltung->Historie angezeigt werden.') %]</span>
                        </div>
                    </div>
                    <div class="form-group row mb-3">
                        <label class="col-lg-5 control-label" for="Other[HISTORY]">[% $user->gettext('Keine Suche nach Kontakten mit ähnlichem Namen bei Kontaktanlage') %]</label>
                        <div class="col-lg-7">
                            <input type="radio" name="Other[NoSearchContact]" value="1" [% if $smarty.const.NOSEARCHCONTACT === 1 %]checked="checked"[% /if %] /> [% $user->gettext('Ja') %]
                            <input type="radio" name="Other[NoSearchContact]" value="0" [% if $smarty.const.NOSEARCHCONTACT != 1 %]checked="checked"[% /if %] /> [% $user->gettext('Nein') %]
                            <span class="help-block">[% $user->gettext('Wenn diese Option aktiviert ist, sucht das System bei der Kontaktanlage nicht nach Kontakten mit ähnlichen Namen.') %]</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-sm-12">
            <div class="card panel-info shadow-sm rounded">
                <div class="card-header">
                    <div class="row">
                        <h3 class="card-title">
                            <div class="col-sm-6">[% $user->gettext('Zeitperioden') %]</div>
                            <div class="col-sm-6 text-end">
                                <a href="index.php?module=settings&class=TimePeriode" class="btn btn-outline-primary btn-sm openInLargeModal">[% $user->gettext('Neue Zeitperiode anlegen') %]</a>
                            </div>
                        </h3>
                    </div>
                </div>
                <div class="card-body">

                    <div class="table-responsive">
                        <table class="table"  >
                            <thead>
                                <tr>
                                    <th>
                                        [% $user->gettext('Name') %]
                                    </th>
                                    <th>
                                        [% $user->gettext('Ab') %]
                                    </th>

                                    <th>
                                        [% $user->gettext('vor Monate / Wochen / Tage') %]
                                    </th>

                                    <th>
                                        [% $user->gettext('folgende Monate / Wochen / Tage') %]
                                    </th>
                                    <th>
                                        [% $user->gettext('Zeitraum (heute)') %]
                                    </th>
                                    <th>
                                        [% $user->gettext('Aktion') %]
                                    </th>
                            </thead>
                            <tbody>
                                [% foreach from=$TimePeriods item=TimePeriod %]
                                    <tr>
                                        <td>
                                            [% $TimePeriod.name %]
                                        </td>
                                        <td>
                                            [% $user->gettext($TimePeriod.start) %]
                                        </td>

                                        <td>
                                            [% $TimePeriod.start_months %]
                                            /
                                            [% $TimePeriod.start_weeks %]
                                            /
                                            [% $TimePeriod.start_days %]
                                        </td>

                                        <td>
                                            [% $TimePeriod.end_months %]
                                            /
                                            [% $TimePeriod.end_weeks %]
                                            /
                                            [% $TimePeriod.end_days %]
                                        </td>
                                        <td>
                                            [% $TimePeriod.example %]
                                        </td>
                                        <td>
                                            <a href="index.php?module=settings&amp;class=TimePeriode&amp;event=edit&amp;id=[% $TimePeriod.id %]" class="btn btn-outline-secondary btn-sm openInLargeModal">[% $user->gettext('Bearbeiten') %]</a> /
                                            <a href="index.php?module=settings&amp;class=TimePeriode&amp;id=[% $TimePeriod.id %]&amp;event=delete" class="btn btn-outline-secondary btn-sm">[% $user->gettext('L&ouml;schen') %]</a>
                                        </td>

                                    </tr>
                                [% /foreach %]
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- Component other-Settings end -->

<div class="modal fade" id="qrCodeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header" style="color: #333;padding-top: 35px;background-color: #f5f5f5;border-color: #ccc;">
                <div class="row">
                    <div class="col-sm-8">
                        <h1>QRCode Heinzelmann URL</h1>
                    </div>
                    <div class="col-sm-4">
                        <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="modal-body modalContent" style="padding: 25px;">
                <img id="qrcode"/>
            </div>
        </div>
    </div>
</div>

<script>
    function loadQRCodeModal() {
        var url = 'index.php?module=settings&event=GenerateQRCode';
        var timestamp = new Date().getTime();

        $.post(url, {url: $('#OtherURL').val(), timestamp: timestamp}, function (Response)
        {
            $("#qrcode").removeAttr("src").attr("src", 'index.php?module=upload&class=download&event=ShowImage&name=HMQRCode_' + timestamp + '.png');
            $('#qrCodeModal').modal('show');
        });
    }
</script>

