Commits

Anonymous committed 074bead

comment out public attachment checkbox on edit page because unused and confusing to user

  • Participants
  • Parent commits 8697c89

Comments (0)

Files changed (1)

c5t/core/templates/page/edit.mak

 %for file_ in page.files:
 <form method="POST" action="${file_.private_path()}" id="files">
   <span style="font-size:1.1em;cursor:pointer;" onclick="edit_file('${file_._id}','')">[edit]</span>
-  <span id="f${file_._id}pp">${'Public' if file_.public else ''}</span>
+<!--  <span id="f${file_._id}pp">${'Display' if file_.public else 'Hide'}</span> -->
     <a id="f${file_._id}a" href="${file_.fileurl or file_.private_path()}" title="${file_.description}">${file_.text or file_.title}</a>
       (Tags:
       %if file_.tags:
   %else:
 <td>File</td><td>${file_.title}</td>  
   %endif
-</tr><tr>  
-<td>Public</td><td><input type="checkbox" ${'checked="checked"' if file_.public else ''} id="f${file_._id}_pub" name="public"></td> 
+<!-- </tr><tr>  
+<td>Public</td><td><input type="checkbox" ${'checked="checked"' if file_.public else ''} id="f${file_._id}_pub" name="public"></td> -->
 </tr></table>
    <button onclick="save_file_update('${file_._id}')">Save</button>
 </div>
       <td><label for="filetags">Tags</label></td>
       <td><input type="hidden" id="filetags" name="filetags"/><ul id="file_tag_handler" class="tagHandler"></ul></td>
     </tr>
-    <tr>
+ <!-- <tr>
       <td><label for="public">Public</label></td>
       <td><input type="checkbox" name="public"/></td>
-    </tr>
+    </tr>   not being used -->
     <tr>
       <td>&nbsp;</td>
       <td><input type="submit" value="Add"/></td>
        tagNames =tagNames_ar.toString(',')
        file_title = $('#f'+filediv+'_title').val();
        file_desc = $('#f'+filediv+'_desc').val();
-       file_public = $('#f'+filediv+'_pub').is(':checked');
+   /*  file_public = $('#f'+filediv+'_pub').is(':checked'); */
       var ainfo = $.ajax({
        type: "POST",
        url: "update_file",
-       data: {file_id : filediv, file_tags: tagNames, ftitle: file_title, fdesc:file_desc, furl:file_url,
-              fpub:file_public
+       data: {file_id : filediv, file_tags: tagNames, ftitle: file_title, fdesc:file_desc, furl:file_url
+             /*  ,fpub:file_public */
              },
        success: function(data) {
          if(file_title == ''){
          }else{
            full_file_url = file_url
          }
-         if(file_public){
-           $('#f'+filediv+'pp').text('Public');
+       /* if(file_public){
+            $('#f'+filediv+'pp').text('Display');
          }else{
-           $('#f'+filediv+'pp').text('');
-         }
+           $('#f'+filediv+'pp').text('Hide');
+         } // update display/hide on save */
          $('#f'+filediv+'a').attr("href", full_file_url);
          $('#f'+filediv+'a').attr("title", file_desc);
          $('#f'+filediv).toggle();