Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.25 KB | None | 0 0
  1. Index: .
  2. ===================================================================
  3. --- .   (revision 55937)
  4. +++ .   (working copy)
  5. @@ -2,219 +2,223 @@
  6.  {tabset name="admin_interwiki"}
  7.     {tab name="{tr}Intertiki client{/tr}"}
  8.         <h2>{tr}Intertiki client{/tr}</h2>
  9. -       <form action="tiki-admin.php?page=intertiki" method="post" name="intertiki">
  10. +       <form action="tiki-admin.php?page=intertiki" method="post" name="intertiki" class="form-horizontal">
  11.             <input type="hidden" name="ticket" value="{$ticket|escape}">
  12. -           <table class="formcolor">
  13. -               <tr>
  14. -                   <td>{tr}Feature{/tr}</td>
  15. -                   <td>{preference name=feature_intertiki}</td>
  16. -               </tr>
  17. -               <tr>
  18. -                   <td>{tr}Tiki Unique key{/tr}</td>
  19. -                   <td><input type="text" name="tiki_key" value="{$prefs.tiki_key}" size="32" /></td>
  20. -               </tr>
  21. -               <tr>
  22. -                   <td>
  23. -                       {tr}InterTiki Slave mode{/tr}
  24. -                       <br>
  25. -                       <small>{tr}Warning: overrides manually registered local users{/tr}</small>
  26. -                   </td>
  27. -                   <td>
  28. -                       {jq}
  29. -                           {literal}
  30. -                           function check_server_visibility(sel) {
  31. -                               if (sel.selectedIndex == 0) {
  32. -                                   document.getElementById('admin-server-options').style.display = 'block';
  33. -                                   document.getElementById('admin-slavemode-options').style.display = 'none';
  34. -                               } else {
  35. -                                   document.getElementById('admin-server-options').style.display = 'none';
  36. -                                   document.getElementById('admin-slavemode-options').style.display = 'block';
  37. -                               }
  38. +           <div class="form-group">
  39. +               <label class="col-sm-3 control-label">Feature</label>
  40. +               <div class="col-sm-7 col-sm-offset-2">
  41. +                     {preference name=feature_intertiki}
  42. +               </div>
  43. +           </div>
  44. +           <div class="form-group">
  45. +               <label class="col-sm-3 control-label">Tiki Unique key</label>
  46. +               <div class="col-sm-7 col-sm-offset-2">
  47. +                     <input type="text" name="tiki_key" value="{$prefs.tiki_key}" size="32" class="form-control"/>
  48. +               </div>
  49. +           </div>
  50. +           <div class="form-group">
  51. +               <label class="col-sm-3 control-label">InterTiki Slave mode
  52. +               <small>Warning: overrides manually registered local users</small></label>
  53. +               <div class="col-sm-7 col-sm-offset-2">
  54. +                   <select name="feature_intertiki_mymaster" onchange="check_server_visibility(this);" class="form-control">
  55. +                       <option value="">{tr}No{/tr}</option>
  56. +                       {foreach from=$prefs.interlist key=k item=i}
  57. +                           <option value="{$k|escape}"{if $prefs.feature_intertiki_mymaster eq $k} selected="selected"{/if}>{$i.name} {tr}as master{/tr}</option>
  58. +                       {/foreach}
  59. +                   </select>
  60. +                   {jq}
  61. +                       {literal}
  62. +                       function check_server_visibility(sel) {
  63. +                           if (sel.selectedIndex == 0) {
  64. +                               document.getElementById('admin-server-options').style.display = 'block';
  65. +                               document.getElementById('admin-slavemode-options').style.display = 'none';
  66. +                           } else {
  67. +                               document.getElementById('admin-server-options').style.display = 'none';
  68. +                               document.getElementById('admin-slavemode-options').style.display = 'block';
  69.                             }
  70. -                           {/literal}
  71. -                       {/jq}
  72. -
  73. -                       <select name="feature_intertiki_mymaster" onchange="check_server_visibility(this);">
  74. -                           <option value="">{tr}No{/tr}</option>
  75. -                           {foreach from=$prefs.interlist key=k item=i}
  76. -                               <option value="{$k|escape}"{if $prefs.feature_intertiki_mymaster eq $k} selected="selected"{/if}>{$i.name} {tr}as master{/tr}</option>
  77. -                           {/foreach}
  78. -                       </select>
  79. -                       <div id="admin-slavemode-options" style="display: {if $prefs.feature_intertiki_mymaster eq ''}none{else}block{/if}">
  80. -                           <input type="checkbox" name="feature_intertiki_import_preferences" {if $prefs.feature_intertiki_import_preferences eq 'y'}checked="checked"{/if}/>
  81. -                           {tr}Import user preferences{/tr}<br>
  82. -
  83. -                           <input type="checkbox" name="feature_intertiki_import_groups" {if $prefs.feature_intertiki_import_groups eq 'y'}checked="checked"{/if}/>
  84. -                           {tr}Import user groups{/tr}
  85. -                           <br>
  86. -                           {tr}Limit group import (comma-separated list of imported groups, leave empty to avoid limitation){/tr}
  87. -                           <br>
  88. -                           <input type="text" name="feature_intertiki_imported_groups" value="{$prefs.feature_intertiki_imported_groups}" />
  89. -                       </div>
  90. -                   </td>
  91. -               </tr>
  92. -               <tr>
  93. -                   <td>
  94. -                       {tr}Intertiki shared cookie for sliding auth under same domain:{/tr}
  95. -                   </td>
  96. -                   <td>
  97. -                       <input type="checkbox" name="feature_intertiki_sharedcookie" {if $prefs.feature_intertiki_sharedcookie eq 'y'}checked="checked"{/if}/>
  98. -                   </td>
  99. -               </tr>
  100. -               {if $prefs.interlist}
  101. -                   {foreach key=k item=i from=$prefs.interlist}
  102. -                       <tr>
  103. -                           <td colspan="2">
  104. -                               <a href="tiki-admin.php?page=intertiki&amp;del={$k|escape:'url'}" class="tips" title=":{tr}Delete{/tr}">{icon name='delete'}</a>
  105. -                               {tr}InterTiki Server{/tr} <b>{$k}</b>
  106. -                           </td>
  107. -                       </tr>
  108. -                       <tr>
  109. -                           <td>{tr}Name{/tr}</td>
  110. -                           <td><input type="text" name="interlist[{$k}][name]" value="{$i.name}" /></td>
  111. -                       </tr>
  112. -                       <tr>
  113. -                           <td>{tr}host{/tr}</td>
  114. -                           <td><input type="text" name="interlist[{$k}][host]" value="{$i.host}" /></td>
  115. -                       </tr>
  116. -                       <tr>
  117. -                           <td>{tr}port{/tr}</td>
  118. -                           <td><input type="text" name="interlist[{$k}][port]" value="{$i.port}" /></td>
  119. -                       </tr>
  120. -                       <tr>
  121. -                           <td>{tr}Path{/tr}</td>
  122. -                           <td><input type="text" name="interlist[{$k}][path]" value="{$i.path}" /></td>
  123. -                       </tr>
  124. -                       <tr>
  125. -                           <td>{tr}Groups{/tr}</td>
  126. -                           <td>
  127. -                               <input type="text" name="interlist[{$k}][groups]" value="{foreach item=g from=$i.groups name=f}{$g}{if !$smarty.foreach.f.last},{/if}{/foreach}" />
  128. -                           </td>
  129. -                       </tr>
  130. -                   {/foreach}
  131. -               {/if}
  132. -               <tr>
  133. -                   <td colspan="2">{tr}Add new server{/tr}</td>
  134. -               </tr>
  135. -               <tr>
  136. -                   <td>{tr}Name{/tr}</td>
  137. -                   <td><input type="text" name="new[name]" value="" /></td>
  138. -               </tr>
  139. -               <tr>
  140. -                   <td>{tr}host{/tr}</td>
  141. -                   <td><input type="text" name="new[host]" value="" /></td>
  142. -               </tr>
  143. -               <tr>
  144. -                   <td>{tr}port{/tr}</td>
  145. -                   <td><input type="text" name="new[port]" value="" /></td>
  146. -               </tr>
  147. -               <tr>
  148. -                   <td>{tr}Path{/tr}</td>
  149. -                   <td><input type="text" name="new[path]" value="" /></td>
  150. -               </tr>
  151. -               <tr>
  152. -                   <td>{tr}Groups{/tr}</td>
  153. -                   <td><input type="text" name="new[groups]" value="" /></td>
  154. -               </tr>
  155. -           </table>
  156. +                       }
  157. +                       {/literal}
  158. +                   {/jq}
  159. +               </div>
  160. +           </div>
  161. +           <div id="admin-slavemode-options" style="display: {if $prefs.feature_intertiki_mymaster eq ''}none{else}block{/if}">
  162. +               <div class="form-group">
  163. +                   <label class="col-sm-3 control-label">Import user preferences</label>
  164. +                   <div class="col-sm-7 col-sm-offset-2">
  165. +                       <input type="checkbox" name="feature_intertiki_import_preferences" {if $prefs.feature_intertiki_import_preferences eq 'y'}checked="checked"{/if} class="form-control" />
  166. +                   </div>
  167. +                   <label class="col-sm-3 control-label">Import user groups</label>
  168. +                   <div class="col-sm-7 col-sm-offset-2">
  169. +                       <input type="checkbox" name="feature_intertiki_import_groups" {if $prefs.feature_intertiki_import_groups eq 'y'}checked="checked"{/if} class="form-control" />
  170. +                   </div>
  171. +                   <label class="col-sm-3 control-label">Limit group import (comma-separated list of imported groups, leave empty to avoid limitation)</label>
  172. +                   <div class="col-sm-7 col-sm-offset-2">
  173. +                       <input type="text" name="feature_intertiki_imported_groups" value="{$prefs.feature_intertiki_imported_groups}" class="form-control" />
  174. +                   </div>
  175. +               </div>
  176. +           </div>
  177. +           <div class="form-group">
  178. +               <label class="col-sm-3 control-label">Intertiki shared cookie for sliding auth under same domain</label>
  179. +               <div class="col-sm-7 col-sm-offset-2">
  180. +                     <input type="checkbox" name="feature_intertiki_sharedcookie" {if $prefs.feature_intertiki_sharedcookie eq 'y'}checked="checked"{/if} class="form-control" />
  181. +               </div>
  182. +           </div>
  183. +           <div class="form-group">
  184. +               <label class="col-sm-3 control-label">Add new server</label>
  185. +                   <div class="col-sm-7 col-sm-offset-2">
  186. +                       <input type="text" name="new[name]" value="" class="form-control text-center"
  187. +                       placeholder="Server Name"/>
  188. +                   </div>
  189. +                   <div class="col-sm-7 col-sm-offset-5">
  190. +                       <input type="text" name="new[port]" value="" class="form-control text-center"
  191. +                       placeholder="Server Port"/>
  192. +                   </div>
  193. +                   <div class="col-sm-7 col-sm-offset-5">
  194. +                       <input type="text" name="new[path]" value="" class="form-control text-center"
  195. +                       placeholder="Server Path"/>
  196. +                   </div>
  197. +                   <div class="col-sm-7 col-sm-offset-5">
  198. +                       <input type="text" name="new[groups]" value="" class="form-control text-center"
  199. +                       placeholder="Server Groups"/>
  200. +                   </div>
  201. +           </div>
  202. +           <div class="form-group">
  203. +               <label class="col-sm-3 text-left control-label ">InterTiki Servers</label>
  204. +               <div class="col-sm-9"></div>
  205. +           </div>
  206. +           {if $prefs.interlist}
  207. +           </br>
  208. +           <div class="form-group">
  209. +               <div class="col-sm-12">
  210. +                   <table class="table table-responsive table-bordered">
  211. +                       <thead>
  212. +                           <tr>
  213. +                               <td>Name</td>
  214. +                               <td>Host</td>
  215. +                               <td>Port</td>
  216. +                               <td>Path</td>
  217. +                               <td>Group</td>
  218. +                               <td>Remove</td>
  219. +                           </tr>
  220. +                       </thead>
  221. +                       <tbody>
  222. +                       {foreach key=k item=i from=$prefs.interlist}
  223. +                           <tr>
  224. +                               <td><input type="text" class="form-control" name="interlist[{$k}][name]" value="{$i.name}" /></td>
  225. +                               <td><input type="text" class="form-control" name="interlist[{$k}][host]" value="{$i.host}" /></td>
  226. +                               <td><input type="text" class="form-control" name="interlist[{$k}][port]" value="{$i.port}" /></td>
  227. +                               <td><input type="text" class="form-control" name="interlist[{$k}][path]" value="{$i.path}" /></td>
  228. +                               <td><input type="text" class="form-control" name="interlist[{$k}][groups]" value="{foreach item=g from=$i.groups name=f}{$g}{if !$smarty.foreach.f.last},{/if}{/foreach}" /></td>
  229. +                               <td>
  230. +                                   <a href="tiki-admin.php?page=intertiki&amp;del={$k|escape:'url'}" class="tips" title=":{tr}Delete{/tr}">{icon name='delete'}</a>
  231. +                                   {tr}InterTiki Server{/tr} <b>{$k}</b>
  232. +                               </td>
  233. +                           </tr>
  234. +                       {/foreach}
  235. +                       <tbody>
  236. +                   </table>
  237. +               </div>
  238. +           </div>
  239. +           {/if}
  240. +           </br>
  241.             <div class="heading input_submit_container" style="text-align: center">
  242. -               <input type="submit" class="btn btn-default btn-sm" name="intertikiclient" value="{tr}Save{/tr}" />
  243. +               <input type="submit" class="btn btn-primary btn-block" name="intertikiclient" value="{tr}Save{/tr}" />
  244.             </div>
  245.         </form>
  246.     {/tab}
  247. -
  248.     {if $prefs.feature_intertiki_mymaster eq ''}
  249.         {tab name="{tr}Intertiki server{/tr}"}
  250.             <h2>{tr}Intertiki server{/tr}</h2>
  251. -           <form action="tiki-admin.php?page=intertiki" method="post" name="intertiki">
  252. +           <form action="tiki-admin.php?page=intertiki" method="post" name="intertiki" class="form-horizontal">
  253.                 <input type="hidden" name="ticket" value="{$ticket|escape}">
  254. -               <table class="table">
  255. -                   <tr>
  256. -                       <td>
  257. -                           {tr}Intertiki shared cookie for sliding auth under same domain:{/tr}</td>
  258. -                       <td>
  259. -                           <input type="checkbox" name="feature_intertiki_sharedcookie" {if $prefs.feature_intertiki_sharedcookie eq 'y'}checked="checked"{/if}/>
  260. -                       </td>
  261. -                   </tr>
  262. -                   <tr>
  263. -                       <td>
  264. -                           {tr}Intertiki Server enabled:{/tr}
  265. -                       </td>
  266. -                       <td>
  267. -                           <input type="checkbox" name="feature_intertiki_server" {if $prefs.feature_intertiki_server eq 'y'}checked="checked"{/if}/>
  268. -                       </td>
  269. -                   </tr>
  270. -                   <tr>
  271. -                       <td>
  272. -                           {tr}Access Log file:{/tr}
  273. -                       </td>
  274. -                       <td>
  275. -                           <input type="text" name="intertiki_logfile" value="{$prefs.intertiki_logfile}" size="42" />
  276. -                       </td>
  277. -                   </tr>
  278. -                   <tr>
  279. -                       <td>
  280. -                           {tr}Errors Log file:{/tr}
  281. -                       </td>
  282. -                       <td>
  283. -                           <input type="text" name="intertiki_errfile" value="{$prefs.intertiki_errfile}" size="42" />
  284. -                       </td>
  285. -                   </tr>
  286. -                   <tr>
  287. -                       <td colspan="2" class="input_submit_container">
  288. -                           {tr}Known hosts{/tr}
  289. -                       </td>
  290. -                   </tr>
  291. -                   <tr>
  292. -                       <td colspan="2">
  293. -                           <table>
  294. +               <div class="form-group">
  295. +                   <label class="col-sm-3 control-label">Intertiki shared cookie for sliding auth under same domain</label>
  296. +                   <div class="col-sm-7 col-sm-offset-2">
  297. +                         <input type="checkbox" name="feature_intertiki_sharedcookie" {if $prefs.feature_intertiki_sharedcookie eq 'y'}checked="checked"{/if} class="form-control" />
  298. +                   </div>
  299. +               </div>
  300. +               <div class="form-group">
  301. +                   <label class="col-sm-3 control-label">Intertiki Server enabled</label>
  302. +                   <div class="col-sm-7 col-sm-offset-2">
  303. +                         <input type="checkbox" name="feature_intertiki_sharedcookie" {if $prefs.feature_intertiki_sharedcookie eq 'y'}checked="checked"{/if} class="form-control" />
  304. +                   </div>
  305. +               </div>
  306. +               <div class="form-group">
  307. +                   <label class="col-sm-3 control-label">Access Log file</label>
  308. +                   <div class="col-sm-7 col-sm-offset-2">
  309. +                         <input type="text" name="intertiki_logfile" value="{$prefs.intertiki_logfile}" size="42" class="form-control" />
  310. +                   </div>
  311. +               </div>
  312. +               <div class="form-group">
  313. +                   <label class="col-sm-3 control-label">Access Log file</label>
  314. +                   <div class="col-sm-7 col-sm-offset-2">
  315. +                         <input type="text" name="intertiki_logfile" value="{$prefs.intertiki_logfile}" size="42" class="form-control" />
  316. +                   </div>
  317. +               </div>
  318. +               <div class="form-group">
  319. +                   <label class="col-sm-3 control-label">Errors Log file</label>
  320. +                   <div class="col-sm-7 col-sm-offset-2">
  321. +                         <input type="text" name="intertiki_errfile" value="{$prefs.intertiki_errfile}" size="42" class="form-control" />
  322. +                   </div>
  323. +               </div>
  324. +               <div class="form-group">
  325. +                   <label class="col-sm-3 text-left control-label ">Known Hosts</label>
  326. +                   <div class="col-sm-9"></div>
  327. +               </div>
  328. +               <div class="form-group">
  329. +                   <div class="col-sm-12">
  330. +                       <table class="table table-responsive table-bordered">
  331. +                           <thead>
  332.                                 <tr>
  333.                                     <td>&nbsp;</td>
  334. -                                   <td>{tr}Name{/tr}</td>
  335. -                                   <td>{tr}Key{/tr}</td>
  336. -                                   <td>{tr}IP{/tr}</td>
  337. -                                   <td>{tr}Contact{/tr}</td>
  338. -                                   <td>{tr}Can register{/tr}</td>
  339. +                                   <td class="text-center">{tr}Name{/tr}</td>
  340. +                                   <td class="text-center">{tr}Key{/tr}</td>
  341. +                                   <td class="text-center">{tr}IP{/tr}</td>
  342. +                                   <td class="text-center">{tr}Contact{/tr}</td>
  343. +                                   <td class="text-center">{tr}Can register{/tr}</td>
  344.                                 </tr>
  345. -                               {if $prefs.known_hosts}
  346. -                                   {foreach key=k item=i from=$prefs.known_hosts}
  347. -                                       <tr>
  348. -                                           <td>
  349. -                                               <a href="tiki-admin.php?page=intertiki&amp;delk={$k|escape:'url'}" class="tips" title=":{tr}Delete{/tr}">{icon name='delete'}</a>
  350. -                                           </td>
  351. -                                           <td>
  352. -                                               <input type="text" name="known_hosts[{$k}][name]" value="{$i.name}" size="12" />
  353. -                                           </td>
  354. -                                           <td>
  355. -                                               <input type="text" name="known_hosts[{$k}][key]" value="{$i.key}" size="32" />
  356. -                                           </td>
  357. -                                           <td>
  358. -                                               <input type="text" name="known_hosts[{$k}][ip]" value="{$i.ip}" size="12" />
  359. -                                           </td>
  360. -                                           <td>
  361. -                                               <input type="text" name="known_hosts[{$k}][contact]" value="{$i.contact}" size="22" />
  362. -                                           </td>
  363. -                                           <td>
  364. -                                               <input type="checkbox" name="known_hosts[{$k}][allowusersregister]" {if $i.allowusersregister eq 'y'}checked="checked"{/if} />
  365. -                                           </td>
  366. -                                       </tr>
  367. -                                   {/foreach}
  368. -                               {/if}
  369. -                               <tr class="formrow">
  370. -                                   <td>{tr}New:{/tr}</td>
  371. -                                   <td><input type="text" name="newhost[name]" value="" size="12" /></td>
  372. -                                   <td><input type="text" name="newhost[key]" value="" size="32" /></td>
  373. -                                   <td><input type="text" name="newhost[ip]" value="" size="12" /></td>
  374. -                                   <td><input type="text" name="newhost[contact]" value="" size="22" /></td>
  375. -                                   <td><input type="checkbox" name="newhost[allowusersregister]" /></td>
  376. -                               </tr>
  377. -                           </table>
  378. -                       </td>
  379. -                   </tr>
  380. -               </table>
  381. +                           </thead>
  382. +                           <tbody>
  383. +                           {if $prefs.known_hosts}
  384. +                               {foreach key=k item=i from=$prefs.known_hosts}
  385. +                                   <tr>
  386. +                                       <td>
  387. +                                           <a href="tiki-admin.php?page=intertiki&amp;delk={$k|escape:'url'}" class="tips" title=":{tr}Delete{/tr}">{icon name='delete'}</a>
  388. +                                       </td>
  389. +                                       <td>
  390. +                                           <input type="text" class="form-control" name="known_hosts[{$k}][name]" value="{$i.name}" />
  391. +                                       </td>
  392. +                                       <td>
  393. +                                           <input type="text" class="form-control" name="known_hosts[{$k}][key]" value="{$i.key}"  />
  394. +                                       </td>
  395. +                                       <td>
  396. +                                           <input type="text" class="form-control" name="known_hosts[{$k}][ip]" value="{$i.ip}"  />
  397. +                                       </td>
  398. +                                       <td>
  399. +                                           <input type="text" class="form-control"  name="known_hosts[{$k}][contact]" value="{$i.contact}"  />
  400. +                                       </td>
  401. +                                       <td>
  402. +                                           <input type="checkbox" class="form-control" name="known_hosts[{$k}][allowusersregister]" {if $i.allowusersregister eq 'y'}checked="checked"{/if} />
  403. +                                       </td>
  404. +                                   </tr>
  405. +                               {/foreach}
  406. +                           {/if}
  407. +                           <tr>
  408. +                               <td>{tr}New:{/tr}</td>
  409. +                               <td><input type="text" class="form-control" name="newhost[name]" value=""  /></td>
  410. +                               <td><input type="text" class="form-control" name="newhost[key]" value=""  /></td>
  411. +                               <td><input type="text" class="form-control" name="newhost[ip]" value=""  /></td>
  412. +                               <td><input type="text" class="form-control" name="newhost[contact]" value=""  /></td>
  413. +                               <td><input type="checkbox" class="form-control" name="newhost[allowusersregister]" /></td>
  414. +                           </tr>
  415. +                           </tbody>
  416. +                       </table>
  417. +                   </div>
  418. +               </div>
  419.                 <div class="heading input_submit_container" style="text-align: center">
  420. -                   <input type="submit" class="btn btn-default btn-sm" name="intertikiserver" value="{tr}Save{/tr}" />
  421. +                   <input type="submit" class="btn btn-primary btn-block" name="intertikiserver" value="{tr}Save{/tr}" />
  422.                 </div>
  423. +               </br>
  424.             </form>
  425.         {/tab}
  426.     {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement