| 1 | |
|---|
| 2 | <table width="100%" align="center" border="0"> |
|---|
| 3 | <tr> |
|---|
| 4 | <td colspan="5" class="groupTitle"> ${ _("Access control")}</td> |
|---|
| 5 | </tr> |
|---|
| 6 | <tr> |
|---|
| 7 | <td colspan="5" style="height: 10px"></td> |
|---|
| 8 | </tr> |
|---|
| 9 | <%include file="AccessControlStatusFrame.tpl" args="parentName=parentName, privacy=privacy, |
|---|
| 10 | parentPrivacy=parentPrivacy, statusColor = statusColor, parentStatusColor=parentStatusColor, |
|---|
| 11 | locator=locator, isFullyPublic=isFullyPublic"/> |
|---|
| 12 | <tr> |
|---|
| 13 | <td class="titleCellTD"><span class="titleCellFormat">${ _("Access key")}</span></td> |
|---|
| 14 | <td bgcolor="white" width="100%" valign="top" class="blacktext"> |
|---|
| 15 | <form action="${ setAccessKeyURL }" id="setAccessKey" method="POST"> |
|---|
| 16 | ${ locator } |
|---|
| 17 | <input name="accessKey" id="accessKey" type="password" autocomplete="off" size=25 value="${ accessKey }"> |
|---|
| 18 | <input type="submit" class="btn" value="${ _("change")}"> <span id="accessKeyChanged" class="successText"></span> |
|---|
| 19 | <div class="warningText">${_("Note: It is more secure to use make the event private instead of using an access key!")}</div> |
|---|
| 20 | </form> |
|---|
| 21 | |
|---|
| 22 | <script type="text/javascript"> |
|---|
| 23 | $E('setAccessKey').dom.onsubmit = function(e) { |
|---|
| 24 | var accessKey = $E('accessKey').dom.value; |
|---|
| 25 | if(accessKey && !confirm('${_("Please note that it is more secure to make the event private instead of using an access key.")}')) { |
|---|
| 26 | return false; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | indicoRequest('event.protection.setAccessKey', { |
|---|
| 30 | confId: ${target.getId()}, |
|---|
| 31 | accessKey: accessKey |
|---|
| 32 | }, |
|---|
| 33 | function(result, error) { |
|---|
| 34 | if(error) { |
|---|
| 35 | IndicoUtil.errorReport(error); |
|---|
| 36 | return; |
|---|
| 37 | } |
|---|
| 38 | |
|---|
| 39 | var elem = $E('accessKeyChanged'); |
|---|
| 40 | elem.dom.innerHTML = accessKey ? '${_("Access key saved")}' : '${_("Access key removed")}'; |
|---|
| 41 | window.setTimeout(function() { |
|---|
| 42 | elem.dom.innerHTML = ''; |
|---|
| 43 | }, 3000); |
|---|
| 44 | } |
|---|
| 45 | ); |
|---|
| 46 | return false; |
|---|
| 47 | } |
|---|
| 48 | </script> |
|---|
| 49 | </td> |
|---|
| 50 | </tr> |
|---|
| 51 | </table> |
|---|