| 1 | <mt:setvarblock name="page_title"><__trans phrase="Manage Banned IdPs"></mt:setvarblock> |
|---|
| 2 | <mt:setvarblock name="html_head" append="1"> |
|---|
| 3 | <script type="text/javascript"> |
|---|
| 4 | <!-- |
|---|
| 5 | function setCreateMode () { |
|---|
| 6 | DOM.addClassName(getByID('create-new-link'), 'hidden'); |
|---|
| 7 | var f = getByID('idp-listing-form'); |
|---|
| 8 | f['__mode'].value = 'add_idp'; |
|---|
| 9 | if (getByID('zero-state')) { |
|---|
| 10 | getByID('zero-state').style.display = 'none'; // hide any messaging |
|---|
| 11 | } |
|---|
| 12 | if (getByID('msg-block')) { |
|---|
| 13 | getByID('msg-block').style.display = 'none'; // hide any messaging |
|---|
| 14 | } |
|---|
| 15 | if (document.all) { |
|---|
| 16 | getByID('create-0').style.display = 'block'; // show subcategory creation row |
|---|
| 17 | } else { |
|---|
| 18 | getByID('create-0').style.display = 'table-row'; |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | getByID('new-url').focus(); |
|---|
| 22 | |
|---|
| 23 | if (getByID('action-col-head')) |
|---|
| 24 | getByID('action-col-head').style.display = 'none'; // hide header of actions column |
|---|
| 25 | if (getByID('delete-col-head')) |
|---|
| 26 | getByID('delete-col-head').style.display = 'none'; // hide header of delete column |
|---|
| 27 | if (getByID('footer-list-actions')) |
|---|
| 28 | getByID('footer-list-actions').style.display = 'none'; |
|---|
| 29 | return false; |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | function cancelCreateMode () { |
|---|
| 33 | DOM.removeClassName(getByID('create-new-link'), 'hidden'); |
|---|
| 34 | getByID('create-0').style.display = 'none'; // hide subcategory creation row |
|---|
| 35 | if (document.all) { |
|---|
| 36 | if (getByID('action-col-head')) |
|---|
| 37 | getByID('action-col-head').style.display = 'block'; // show header of actions column |
|---|
| 38 | if (getByID('delete-col-head')) |
|---|
| 39 | getByID('delete-col-head').style.display = 'block'; // show header of delete column |
|---|
| 40 | } else { |
|---|
| 41 | if (getByID('action-col-head')) |
|---|
| 42 | getByID('action-col-head').style.display = 'table-cell'; |
|---|
| 43 | if (getByID('delete-col-head')) |
|---|
| 44 | getByID('delete-col-head').style.display = 'table-cell'; |
|---|
| 45 | } |
|---|
| 46 | if (getByID('footer-list-actions')) { |
|---|
| 47 | getByID('footer-list-actions').style.display = 'block'; |
|---|
| 48 | } |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | var tableSelect; |
|---|
| 52 | function init() |
|---|
| 53 | { |
|---|
| 54 | // setup |
|---|
| 55 | tableSelect = new TC.TableSelect( "idp-listing-table" ); |
|---|
| 56 | tableSelect.rowSelect = true; |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | TC.attachLoadEvent( init ); |
|---|
| 60 | //--> |
|---|
| 61 | </script> |
|---|
| 62 | </mt:setvarblock> |
|---|
| 63 | <mt:setvarblock name="content_header"> |
|---|
| 64 | <div id="msg-block"> |
|---|
| 65 | <mt:if name="saved"> |
|---|
| 66 | <mtapp:statusmsg |
|---|
| 67 | id="saved" |
|---|
| 68 | class="success" |
|---|
| 69 | rebuild="all"> |
|---|
| 70 | <__trans phrase="Your IdP changes and additions have been made."> |
|---|
| 71 | </mtapp:statusmsg> |
|---|
| 72 | </mt:if> |
|---|
| 73 | |
|---|
| 74 | <mt:if name="saved_deleted"> |
|---|
| 75 | <mtapp:statusmsg |
|---|
| 76 | id="saved-deleted" |
|---|
| 77 | class="success" |
|---|
| 78 | rebuild="all"> |
|---|
| 79 | <__trans phrase="You have successfully deleted the selected IdP."> |
|---|
| 80 | </mtapp:statusmsg> |
|---|
| 81 | </mt:if> |
|---|
| 82 | </div> |
|---|
| 83 | </mt:setvarblock> |
|---|
| 84 | <mt:setvarblock name="action_buttons"> |
|---|
| 85 | <a href="javascript:void(0)" |
|---|
| 86 | onclick="doRemoveItems(getByID('idp-listing-form'), '<__trans phrase="idp" escape="js">', '<__trans phrase="idps" escape="js">'); return false;" |
|---|
| 87 | accesskey="x" |
|---|
| 88 | title="<__trans phrase="Delete selected IdP (x)">" |
|---|
| 89 | ><__trans phrase="Delete"></a> |
|---|
| 90 | </mt:setvarblock> |
|---|
| 91 | <mt:var name="position_actions_top" value="1"> |
|---|
| 92 | <mt:setvarblock name="content_header"> |
|---|
| 93 | <p id="create-new-link"><a href="javascript:void(0)" onclick="return setCreateMode();" class="icon-left icon-create"><__trans phrase="Add new URL"></a></p> |
|---|
| 94 | </mt:setvarblock> |
|---|
| 95 | <mt:include name="include/header.tmpl"> |
|---|
| 96 | <mtapp:listing |
|---|
| 97 | type="idp" |
|---|
| 98 | hide_pager="1"> |
|---|
| 99 | <mt:if __first__> |
|---|
| 100 | <thead> |
|---|
| 101 | <tr> |
|---|
| 102 | <th id="delete-col-head" class="cb"><input type="checkbox" name="id-head" value="all" class="select" /></th> |
|---|
| 103 | <th id="cat-categories" class="category"><__trans phrase="IdP URL"></th> |
|---|
| 104 | </tr> |
|---|
| 105 | </thead> |
|---|
| 106 | <tbody> |
|---|
| 107 | </mt:if> |
|---|
| 108 | <tr class="create-row create-inline" id="create-0" style="display:none"> |
|---|
| 109 | <td colspan="2"> |
|---|
| 110 | <mtapp:setting |
|---|
| 111 | id="new-parent-category" |
|---|
| 112 | label="URL of the IdP" |
|---|
| 113 | label_class="inline field-no-header" |
|---|
| 114 | hint="" |
|---|
| 115 | show_hint="0"> |
|---|
| 116 | <input type="text" name="new_url" id="new-url" value="" maxlength="100" /> |
|---|
| 117 | </mtapp:setting> |
|---|
| 118 | <mtapp:setting |
|---|
| 119 | id="actions" |
|---|
| 120 | label="<__trans phrase="Actions">" |
|---|
| 121 | label_class="inline field-no-header" |
|---|
| 122 | hint="" |
|---|
| 123 | show_hint="0"> |
|---|
| 124 | <span class="buttons"> |
|---|
| 125 | <a href="javascript:void(0)" mt:command="submit" |
|---|
| 126 | title="<__trans phrase="Ban URL">" |
|---|
| 127 | ><__trans phrase="Ban URL"></a> |
|---|
| 128 | <a href="javascript:void(0)" |
|---|
| 129 | onclick="cancelCreateMode(); return false" |
|---|
| 130 | ><__trans phrase="Cancel"></a> |
|---|
| 131 | </span> |
|---|
| 132 | </mtapp:setting> |
|---|
| 133 | </td> |
|---|
| 134 | </tr> |
|---|
| 135 | <tr class="<mt:if name="__odd__">odd<mt:else>even</mt:if>" id="category-<mt:var name="idp_id">"> |
|---|
| 136 | <td class="cb" id="delete-<mt:var name="idp_id">"><input type="checkbox" name="id" value="<mt:var name="idp_id">" class="select" /></td> |
|---|
| 137 | <td class="category"><mt:var name="url"></td> |
|---|
| 138 | </tr> |
|---|
| 139 | <mt:if __last__> |
|---|
| 140 | </tbody> |
|---|
| 141 | </mt:if> |
|---|
| 142 | <mt:else> |
|---|
| 143 | <mtapp:statusmsg id="zero-state" class="info zero-state"> |
|---|
| 144 | <__trans phrase="No banned IdPs could be found."> |
|---|
| 145 | </mtapp:statusmsg> |
|---|
| 146 | <form id="idp-listing-form" class="listing-form" action="<$mt:var name="script_url"$>"> |
|---|
| 147 | <input type="hidden" name="__mode" value="add_idp" /> |
|---|
| 148 | <input type="hidden" name="_type" value="idp" /> |
|---|
| 149 | |
|---|
| 150 | <input type="hidden" name="return_args" value="<$mt:var name="return_args" escape="html"$>" /> |
|---|
| 151 | <input type="hidden" name="blog_id" value="<$mt:var name="blog_id"$>" /> |
|---|
| 152 | <input type="hidden" name="magic_token" value="<$mt:var name="magic_token"$>" /> |
|---|
| 153 | <div id="actions-bar-top" class="actions-bar actions-bar-top"> |
|---|
| 154 | <table id="idp-listing-table" class="idp-listing-table compact" cellspacing="0"> |
|---|
| 155 | <tbody> |
|---|
| 156 | <tr class="create-row create-inline" id="create-0" style="display:none"> |
|---|
| 157 | <td colspan="2"> |
|---|
| 158 | <mtapp:setting |
|---|
| 159 | id="new-parent-category" |
|---|
| 160 | label="URL of the IdP" |
|---|
| 161 | label_class="inline field-no-header" |
|---|
| 162 | hint="" |
|---|
| 163 | show_hint="0"> |
|---|
| 164 | <input type="text" name="new_url" id="new-url" value="" maxlength="100" /> |
|---|
| 165 | </mtapp:setting> |
|---|
| 166 | <mtapp:setting |
|---|
| 167 | id="actions" |
|---|
| 168 | label="<__trans phrase="Actions">" |
|---|
| 169 | label_class="inline field-no-header" |
|---|
| 170 | hint="" |
|---|
| 171 | show_hint="0"> |
|---|
| 172 | <span class="buttons"> |
|---|
| 173 | <a href="javascript:void(0)" mt:command="submit" |
|---|
| 174 | title="<__trans phrase="Ban URL">" |
|---|
| 175 | ><__trans phrase="Ban URL"></a> |
|---|
| 176 | <a href="javascript:void(0)" |
|---|
| 177 | onclick="cancelCreateMode(); return false" |
|---|
| 178 | ><__trans phrase="Cancel"></a> |
|---|
| 179 | </span> |
|---|
| 180 | </mtapp:setting> |
|---|
| 181 | </td> |
|---|
| 182 | </tr> |
|---|
| 183 | </tbody> |
|---|
| 184 | </table> |
|---|
| 185 | </form> |
|---|
| 186 | </mtapp:listing> |
|---|
| 187 | <mt:include name="include/footer.tmpl"> |
|---|
| 188 | |
|---|