src/cm/media/js/client/c_interface_forms.js
changeset 504 b2e0186daa5b
parent 341 053551f213fb
equal deleted inserted replaced
502:8ec189cc214d 504:b2e0186daa5b
    39   if ('nameInputId' in ids)
    39   if ('nameInputId' in ids)
    40     html = html + gFormHtml['nameInput'].replace('###', ids['nameInputId'])  ;
    40     html = html + gFormHtml['nameInput'].replace('###', ids['nameInputId'])  ;
    41   if ('emailInputId' in ids)
    41   if ('emailInputId' in ids)
    42     html = html + gFormHtml['emailInput'].replace('###', ids['emailInputId']) ;
    42     html = html + gFormHtml['emailInput'].replace('###', ids['emailInputId']) ;
    43   
    43   
    44   html = html + gFormHtml['titleInput'].replace('###', ids['titleInputId']) + gFormHtml['contentInput'].replace('###', ids['contentInputId']) + gFormHtml['tagsInput'].replace('###', ids['tagsInputId']);
    44   html = html + gFormHtml['titleInput'].replace('###', ids['titleInputId']) + gFormHtml['contentInput'].replace('###', ids['contentInputId']);
       
    45 
       
    46   categories = CY.JSON.parse(sv_categories);
       
    47   if (categories.hasOwnProperty('0')) {
       
    48     category_options = '';
       
    49     for (c in categories) {
       
    50       category_options += '<option value="' + c + '">' + categories[c] + '</option>';
       
    51     }
       
    52     gFormHtml['categoryInput'] = gettext("Category:") + '&nbsp;<select id="###" name="category" class="n_category comment_input" style="padding:1px;" type="text">' + category_options + '</select>';
       
    53     html = html + '<span class="n_category_input">' + gFormHtml['categoryInput'].replace('###', ids['categoryInputId']) + '<br /></span>';
       
    54   }
       
    55 
       
    56   html = html + gFormHtml['tagsInput'].replace('###', ids['tagsInputId']);
       
    57 
    45   html = html + gFormHtml['hidden'].replace('###', ids['formatInputId']).replace('???', 'format') ;
    58   html = html + gFormHtml['hidden'].replace('###', ids['formatInputId']).replace('???', 'format') ;
    46   html = html + gFormHtml['hidden'].replace('###', ids['startWrapperInputId']).replace('???', 'start_wrapper') ;
    59   html = html + gFormHtml['hidden'].replace('###', ids['startWrapperInputId']).replace('???', 'start_wrapper') ;
    47   html = html + gFormHtml['hidden'].replace('###', ids['endWrapperInputId']).replace('???', 'end_wrapper') ;
    60   html = html + gFormHtml['hidden'].replace('###', ids['endWrapperInputId']).replace('???', 'end_wrapper') ;
    48   html = html + gFormHtml['hidden'].replace('###', ids['startOffsetInputId']).replace('???', 'start_offset') ;
    61   html = html + gFormHtml['hidden'].replace('###', ids['startOffsetInputId']).replace('???', 'start_offset') ;
    49   html = html + gFormHtml['hidden'].replace('###', ids['endOffsetInputId']).replace('???', 'end_offset') ;
    62   html = html + gFormHtml['hidden'].replace('###', ids['endOffsetInputId']).replace('???', 'end_offset') ;