PageRenderTime 47ms CodeModel.GetById 23ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/applications/noviusos_media/views/admin/media_add.view.php

https://github.com/jay3/core
PHP | 62 lines | 49 code | 5 blank | 8 comment | 0 complexity | cfceef3b6ae45ba37bd589630a9ecb30 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. /**
  3. * NOVIUS OS - Web OS for digital communication
  4. *
  5. * @copyright 2011 Novius
  6. * @license GNU Affero General Public License v3 or (at your option) any later version
  7. * http://www.gnu.org/licenses/agpl-3.0.html
  8. * @link http://www.novius-os.org
  9. */
  10. Nos\I18n::current_dictionary(array('noviusos_media::common', 'nos::common'));
  11. $uniqid = uniqid('id_');
  12. $fieldset->set_config('field_template', '{field}');
  13. ?>
  14. <div class="media_form page line ui-widget" id="<?= $uniqid ?>">
  15. <?= $fieldset->build_hidden_fields(); ?>
  16. <div class="col c1" style="z-index:99;"></div>
  17. <div class="col c11" style="z-index:99;">
  18. <div class="line" style="margin-bottom:1em;">
  19. <table class="fieldset standalone">
  20. <tr class="title">
  21. <th><?= $fieldset->field('media')->label ?></th>
  22. <td><?= $fieldset->field('media')->build() ?></td>
  23. </tr>
  24. <tr>
  25. <th></th>
  26. <td>
  27. <p><em><?= strtr(__('The file size must not exceed {{size}}.'), array('{{size}}' => ini_get('upload_max_filesize'))) ?> <?= strtr(__('What’s more these file types are not allowed: {{extensions}}.'), array('{{extensions}}' => implode(', ', \Config::get('novius-os.upload.disabled_extensions', array('php'))))) ?></em></p>
  28. </td>
  29. </tr>
  30. <tr>
  31. <th><?= $fieldset->field('media_title')->label ?></th>
  32. <td><?= $fieldset->field('media_title')->build() ?></td>
  33. </tr>
  34. <tr>
  35. <th><?= $fieldset->field('media_file')->label ?></th>
  36. <td class="table-field"><?= $fieldset->field('media_file')->build() ?><span> &nbsp; <label><input type="checkbox" data-id="same_title" checked /> <?= __('Use title') ?></label></span></td>
  37. </tr>
  38. <tr>
  39. <th><?= $fieldset->field('media_folder_id')->label ?></th>
  40. <td><?= $fieldset->field('media_folder_id')->build() ?></td>
  41. </tr>
  42. </table>
  43. </div>
  44. </div>
  45. </div>
  46. <script type="text/javascript">
  47. require(
  48. [
  49. 'jquery-nos-media-add-form',
  50. 'link!static/apps/noviusos_media/css/admin.css'
  51. ],
  52. function($) {
  53. $(function() {
  54. $('#<?= $uniqid ?>').nosFormUI().nosMediaAddForm();
  55. });
  56. });
  57. </script>