Advertisement
freddy0512

modal

Jun 22nd, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.79 KB | None | 0 0
  1. <link href="<?php echo base_url(); ?>asset/css/dropzone.css" type="text/css" rel="stylesheet" />
  2. <script src="<?php echo base_url(); ?>asset/js/dropzone.js"></script>
  3.  
  4.  
  5. <script src="<?php echo base_url(); ?>asset/js/dropzone.js"></script>
  6. <script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>
  7. <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  8. <script>
  9. tinymce.init({
  10. selector: "textarea",
  11. editor_selector : "disable",
  12. theme: "modern",
  13. width: 600,
  14. height: 300,
  15. plugins: [
  16. "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
  17. "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
  18. "save table contextmenu directionality emoticons template paste textcolor"
  19. ],
  20. content_css: "css/content.css",
  21. toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | ",
  22. style_formats: [
  23. {title: 'Bold text', inline: 'b'},
  24. {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
  25. {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
  26. {title: 'Example 1', inline: 'span', classes: 'example1'},
  27. {title: 'Example 2', inline: 'span', classes: 'example2'},
  28. {title: 'Table styles'},
  29. {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
  30. ]
  31. });
  32. </script>
  33.  
  34.  
  35.  
  36. <div id="page-wrapper" >
  37.  
  38. <div class="container-fluid">
  39.  
  40. <div class="row">
  41. <div class="col-lg-12">
  42. <h1 class="page-header">
  43. Dashboard
  44. </h1>
  45.  
  46. </div>
  47. </div>
  48.  
  49.  
  50. <div class="row">
  51. <div class="col-lg-12 isi">
  52.  
  53.  
  54.  
  55. <a href="<?php echo site_url('admin/testimonial');?>" class="btn btn-primary ">Kembali </a>
  56.  
  57. <div style="height:10px;">
  58. </div>
  59.  
  60.  
  61.  
  62. <form class="form-horizontal" method="post" action="<?php echo site_url('admin/testimonial/unggah') ?>" enctype="multipart/form-data">
  63. <fieldset>
  64.  
  65. <?php foreach($edit->result() as $detail){ ?>
  66. <!-- Text input-->
  67.  
  68.  
  69. <div class="form-group">
  70. <label class="col-lg-4 control-label" for="textinput">Nama</label>
  71. <div class="col-lg-4">
  72. <input id="textinput" name="tes_name" type="text" placeholder="Judul Terapi" class="form-control input-md" required="" value="<?php echo $detail->tes_name ;?>">
  73.  
  74. <input id="textinput" name="tes_id" type="hidden" placeholder="Judul Terapi" class="form-control input-md" required="" value="<?php echo $detail->tes_id ;?>">
  75.  
  76.  
  77. <input id="textinput" name="tes_image_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->tes_image ;?>">
  78. <input id="textinput" name="testi_photo_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_photo ;?>">
  79. <input id="textinput" name="tes_beforeafter_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->tes_beforeafter ;?>">
  80.  
  81.  
  82. <input id="textinput" name="testi_img1_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img1 ;?>">
  83. <input id="textinput" name="testi_img2_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img2 ;?>">
  84. <input id="textinput" name="testi_img3_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img3 ;?>">
  85. <input id="textinput" name="testi_img4_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img4 ;?>">
  86. <input id="textinput" name="testi_img5_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img5 ;?>">
  87. <input id="textinput" name="testi_img6_old" type="hidden" placeholder="Judul Terapi" class="form-control input-md" value="<?php echo $detail->testi_img6 ;?>">
  88.  
  89.  
  90. </div>
  91.  
  92.  
  93.  
  94. </div>
  95.  
  96. <div class="form-group">
  97. <label class="col-lg-4 control-label" for="textinput">Pekerjaan 1</label>
  98. <div class="col-lg-4">
  99. <input id="textinput" name="tes_job" type="text" placeholder="Judul Terapi" class="form-control input-md" required="" value="<?php echo $detail->tes_job ;?>">
  100.  
  101. </div>
  102. </div>
  103.  
  104. <div class="form-group">
  105. <label class="col-lg-4 control-label" for="textinput">Pekerjaan 2</label>
  106. <div class="col-lg-4">
  107. <input id="textinput" name="tes_job1" type="text" placeholder="Judul Terapi" class="form-control input-md" required="" value="<?php echo $detail->tes_job1 ;?>">
  108.  
  109. </div>
  110. </div>
  111.  
  112. <!-- Textarea -->
  113. <div class="form-group">
  114. <label class="col-lg-4 control-label" for="textarea">Judul Testimoni</label>
  115. <div class="col-lg-4">
  116.  
  117. <input id="textinput" name="tes_tesmoni" type="text" placeholder="Judul Testimoni" class="form-control input-lg" required="" value="<?php echo $detail->tes_tesmoni ;?>">
  118.  
  119.  
  120. </div>
  121. </div>
  122.  
  123.  
  124.  
  125. <!-- Textarea -->
  126. <div class="form-group">
  127. <label class="col-lg-4 control-label" for="textarea">Testimoni Deskripsi</label>
  128. <div class="col-lg-4">
  129. <textarea class="form-control" id="textarea" name="tes_des" rows="15" cols="40"><?php echo $detail->tes_des ;?></textarea>
  130. <?php echo form_error('tes_des'); ?>
  131. </div>
  132.  
  133.  
  134. </div>
  135.  
  136.  
  137.  
  138.  
  139. <!-- Select Basic -->
  140. <div class="form-group">
  141. <label class="col-lg-4 control-label" for="textinput">Lokasi</label>
  142. <div class="col-lg-4">
  143. <input id="textinput" name="tes_location" type="text" placeholder="JLokasi" class="form-control input-md" required="" value="<?php echo $detail->tes_location ;?>">
  144.  
  145. </div>
  146. </div>
  147.  
  148.  
  149.  
  150.  
  151.  
  152. <!-- File Button -->
  153. <div class="form-group">
  154. <label class="col-lg-4 control-label" for="filebutton">Foto Pasien</label>
  155.  
  156. <div class="col-lg-2">
  157. <img id="image_upload_preview" src="<?php echo base_url() ?>uploads/testimoni/<?php echo $detail->tes_image ?>" width="200px" height="150px" />
  158. </div>
  159.  
  160. <div class="col-lg-2">
  161. <a href="" class="btn btn-lg btn-success" data-toggle="modal" data-target="#basicModal">Modal</a>
  162. </div>
  163. </div>
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. <!-- File Button -->
  171. <div class="form-group">
  172. <label class="col-lg-4 control-label" for="filebutton">Foto Before After</label>
  173.  
  174. <div class="col-lg-2">
  175. <img src="<?php echo base_url() ?>uploads/testimoni/<?php echo $detail->tes_beforeafter ?>" width="200px" height="150px" />
  176. </div>
  177.  
  178. <div class="col-lg-2">
  179. <input type="file" class="form-control" name="before_after" id="id_before_After" >
  180. </div>
  181. </div>
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189. <!-- Multiple Radios (inline) -->
  190. <div class="form-group">
  191. <label class="col-lg-4 control-label" for="radios">Status</label>
  192. <div class="col-lg-4">
  193. <label class="radio-inline" for="radios-1"><input type="radio" name="status" value="Active" <?php echo set_radio('myradio', 'Active', ($detail->tes_stat == "Active") ? TRUE : FALSE ); ?>>Active</label>
  194. <label class="radio-inline" for="radios-1"><input type="radio" name="status" value="Not Active" <?php echo set_radio('myradio', 'Not Active', ($detail->tes_stat == "Not Active") ? TRUE : FALSE ); ?> >Not Active</label>
  195. </div>
  196. </div>
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. <div class="form-group">
  208. <label class="col-lg-4 control-label" for="radios">Testimoni Gambar</label>
  209. <div class="col-lg-4">
  210.  
  211. <label class="radio-inline" for="radios-0" required=""><input type="radio" name="layout" value="3" <?php echo set_radio('myradio', '3', ($detail->tes_layout == "3") ? TRUE : FALSE ); ?> required="" id="item_false"> 3 Gambar</label>
  212.  
  213.  
  214.  
  215. <label class="radio-inline" for="radios-0" required=""><input type="radio" name="layout" value="6" <?php echo set_radio('myradio', '3', ($detail->tes_layout == "6") ? TRUE : FALSE ); ?> required="" id="item_true"> 6 Gambar</label>
  216.  
  217. </div>
  218. </div>
  219.  
  220.  
  221.  
  222.  
  223. <!-- File Button -->
  224. <div class="form-group">
  225. <label class="col-lg-4 control-label" for="filebutton">Foto Bersama Pasien</label>
  226.  
  227. <div class="col-lg-2">
  228. <img id="image_upload_preview_fotodokter" src="<?php echo base_url()?>uploads/testimoni/<?php echo $detail->testi_photo ?>" width="200px" height="150px" />
  229. </div>
  230.  
  231. <div class="col-lg-2">
  232. <input type="file" class="form-control" name="fotodokter" id="fotodokter" >
  233. </div>
  234.  
  235. </div>
  236.  
  237.  
  238.  
  239.  
  240. <div class="form-group">
  241. <label class="col-lg-4 control-label" for="textarea">Kesaksian Pasien</label>
  242. <div class="col-lg-4">
  243. <textarea name="kesaksian" rows="15"></textarea>
  244. </div>
  245. </div>
  246.  
  247.  
  248.  
  249.  
  250.  
  251. <!--6 gambar-->
  252. <div class="green box">
  253.  
  254. <div class="form-group">
  255. <label class="col-lg-4 control-label" for="textinput">Terapi ke 1 </label>
  256. <div class="col-lg-4">
  257. <input id="textinput" name="terapi1" value="<?php echo $detail->testi_title1 ;?>" type="text" value="" placeholder="Terapi Ke" class="form-control input-lg">
  258.  
  259. </div>
  260. </div>
  261.  
  262.  
  263. <div class="form-group">
  264. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 1</label>
  265. <div class="col-lg-4">
  266. <textarea name="progress1" rows="5"><?php echo $detail->testi_caption1 ;?></textarea>
  267. </div>
  268. </div>
  269.  
  270. <!-- File Button -->
  271. <div class="form-group">
  272. <label class="col-lg-4 control-label" for="filebutton">Foto 1</label>
  273.  
  274. <div class="col-lg-2">
  275.  
  276.  
  277. <?php
  278. $image_path = base_url()."uploads/testimoni";
  279. if ($detail->testi_img1 != '')
  280. {
  281. echo "<img src=' $image_path/$detail->testi_img1' width='200px' height='150px'>";
  282. }
  283. else
  284. {
  285. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  286. }
  287. ?>
  288.  
  289. </div>
  290.  
  291. <div class="col-lg-2">
  292. <input type="file" class="form-control" name="gambar1" id="id_1" >
  293. </div>
  294.  
  295. </div>
  296.  
  297.  
  298. <br>
  299. <hr>
  300. <br>
  301.  
  302.  
  303.  
  304. <div class="form-group">
  305. <label class="col-lg-4 control-label" for="textinput">Terapi ke 2 </label>
  306. <div class="col-lg-4">
  307. <input id="textinput" name="terapi2" value="<?php echo $detail->testi_title2 ;?>" type="text" placeholder="Terapi Ke" class="form-control input-lg">
  308.  
  309. </div>
  310. </div>
  311.  
  312.  
  313. <div class="form-group">
  314. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 2</label>
  315. <div class="col-lg-4">
  316. <textarea name="progress2" rows="5"><?php echo $detail->testi_caption2 ;?></textarea>
  317. </div>
  318. </div>
  319.  
  320. <!-- File Button -->
  321. <div class="form-group">
  322. <label class="col-lg-4 control-label" for="filebutton">Foto 2</label>
  323. <div class="col-lg-2">
  324. <?php
  325. $image_path = base_url()."uploads/testimoni";
  326. if ($detail->testi_img2 != '')
  327. {
  328. echo "<img src=' $image_path/$detail->testi_img1' width='200px' height='150px'>";
  329. }
  330. else
  331. {
  332. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  333. }
  334. ?>
  335. </div>
  336.  
  337. <div class="col-lg-2">
  338. <input type="file" class="form-control" name="gambar2" id="id_2" >
  339. </div>
  340.  
  341. </div>
  342.  
  343. <br>
  344. <hr>
  345. <br>
  346.  
  347. <div class="form-group">
  348. <label class="col-lg-4 control-label" for="textinput">Terapi ke 3</label>
  349. <div class="col-lg-4">
  350. <input id="textinput" name="terapi3" value="<?php echo $detail->testi_title3 ;?>" type="text" placeholder="Terapi Ke" class="form-control input-lg">
  351.  
  352. </div>
  353. </div>
  354.  
  355.  
  356. <div class="form-group">
  357. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 3</label>
  358. <div class="col-lg-4">
  359. <textarea name="progress3" rows="5"><?php echo $detail->testi_caption3 ;?></textarea>
  360. </div>
  361. </div>
  362.  
  363.  
  364. <!-- File Button -->
  365. <div class="form-group">
  366. <label class="col-lg-4 control-label" for="filebutton">Foto 3</label>
  367.  
  368. <div class="col-lg-2">
  369. <?php
  370. $image_path = base_url()."uploads/testimoni";
  371. if ($detail->testi_img3 != '')
  372. {
  373. echo "<img src=' $image_path/$detail->testi_img3' width='200px' height='150px'>";
  374. }
  375. else
  376. {
  377. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  378. }
  379. ?>
  380.  
  381. </div>
  382.  
  383. <div class="col-lg-2">
  384. <input type="file" class="form-control" name="gambar3" id="id_3" >
  385. </div>
  386.  
  387. </div>
  388.  
  389. <br>
  390. <hr>
  391. <br>
  392.  
  393.  
  394. <div class="form-group">
  395. <label class="col-lg-4 control-label" for="textinput">Terapi ke 4</label>
  396. <div class="col-lg-4">
  397. <input id="textinput" name="terapi4" value="<?php echo $detail->testi_title4 ;?>" type="text" placeholder="Terapi Ke" class="form-control input-lg disable">
  398.  
  399. </div>
  400. </div>
  401.  
  402. <div class="form-group">
  403. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 4</label>
  404. <div class="col-lg-4">
  405. <textarea class="disable" name="progress4" rows="5"><?php echo $detail->testi_caption4 ;?></textarea>
  406. </div>
  407. </div>
  408.  
  409.  
  410. <!-- File Button -->
  411. <div class="form-group">
  412. <label class="col-lg-4 control-label" for="filebutton">Foto 4</label>
  413.  
  414. <div class="col-lg-2">
  415. <?php
  416. $image_path = base_url()."uploads/testimoni";
  417. if ($detail->testi_img4 != '')
  418. {
  419. echo "<img src=' $image_path/$detail->testi_img4' width='200px' height='150px'>";
  420. }
  421. else
  422. {
  423. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  424. }
  425. ?>
  426.  
  427. </div>
  428.  
  429. <div class="col-lg-2">
  430. <input type="file" class="form-control" name="gambar4" id="id_4" >
  431. </div>
  432.  
  433. </div>
  434.  
  435. <br>
  436. <hr>
  437. <br>
  438.  
  439.  
  440. <div class="form-group">
  441. <label class="col-lg-4 control-label" for="textinput">Terapi ke 5</label>
  442. <div class="col-lg-4">
  443. <input id="textinput" name="terapi5" value="<?php echo $detail->testi_title5 ;?>" type="text" placeholder="Terapi Ke" class="form-control input-lg disable">
  444.  
  445. </div>
  446. </div>
  447.  
  448.  
  449. <div class="form-group">
  450. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 5</label>
  451. <div class="col-lg-4">
  452. <textarea class="disable" name="progress5" rows="5"><?php echo $detail->testi_caption4 ;?></textarea>
  453. </div>
  454. </div>
  455.  
  456.  
  457. <!-- File Button -->
  458. <div class="form-group">
  459. <label class="col-lg-4 control-label" for="filebutton">Foto 5</label>
  460.  
  461. <div class="col-lg-2">
  462. <?php
  463. $image_path = base_url()."uploads/testimoni";
  464. if ($detail->testi_img5 != '')
  465. {
  466. echo "<img src=' $image_path/$detail->testi_img5' width='200px' height='150px'>";
  467. }
  468. else
  469. {
  470. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  471. }
  472. ?>
  473.  
  474. </div>
  475.  
  476. <div class="col-lg-2">
  477. <input type="file" class="form-control" name="gambar5" id="id_5" >
  478. </div>
  479.  
  480. </div>
  481.  
  482. <br>
  483. <hr>
  484. <br>
  485.  
  486.  
  487. <div class="form-group">
  488. <label class="col-lg-4 control-label" for="textinput">Terapi ke 6</label>
  489. <div class="col-lg-4">
  490. <input id="textinput" name="terapi6" value="<?php echo $detail->testi_title6 ;?>" type="text" placeholder="Terapi Ke" class="form-control input-lg disable">
  491.  
  492. </div>
  493. </div>
  494.  
  495. <div class="form-group">
  496. <label class="col-lg-4 control-label" for="textarea">Progress Terapi 6</label>
  497. <div class="col-lg-4">
  498. <textarea class="disable" name="progress6" rows="5"><?php echo $detail->testi_caption6 ;?></textarea>
  499. </div>
  500. </div>
  501.  
  502.  
  503. <!-- File Button -->
  504. <div class="form-group">
  505. <label class="col-lg-4 control-label" for="filebutton">Foto 6</label>
  506.  
  507. <div class="col-lg-2">
  508. <?php
  509. $image_path = base_url()."uploads/testimoni";
  510. if ($detail->testi_img6 != '')
  511. {
  512. echo "<img src=' $image_path/$detail->testi_img6' width='200px' height='150px'>";
  513. }
  514. else
  515. {
  516. echo "<img src='http://placehold.it/100x100' width='200px' height='150px'>";
  517. }
  518. ?>
  519.  
  520. </div>
  521.  
  522. <div class="col-lg-2">
  523. <input type="file" class="form-control" name="gambar6" id="id_6" >
  524. </div>
  525.  
  526. </div>
  527.  
  528. <br>
  529. <hr>
  530. <br>
  531.  
  532.  
  533.  
  534.  
  535. <!-- File Button -->
  536.  
  537. <br>
  538. <hr>
  539. <br>
  540.  
  541. <div class ="col-lg-4 col-lg-offset-4">
  542. <!-- Alert Success & Error -->
  543. <?php if(isset($error)):?>
  544. <div class="alert alert-danger">
  545. <?php echo $error; ?>
  546. </div>
  547. <?php endif;?>
  548. </div>
  549.  
  550.  
  551. </div>
  552.  
  553. <?php } ?>
  554.  
  555. <div class="form-group">
  556. <div class="col-lg-4 col-lg-offset-4">
  557. <button id="singlebutton" name="singlebutton" class="btn btn-primary">Button</button>
  558. </div>
  559. </div>
  560.  
  561. </fieldset>
  562. </form>
  563.  
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568.  
  569.  
  570. <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
  571. <script>
  572.  
  573. function readURL(input) {
  574. if (input.files && input.files[0]) {
  575. var reader = new FileReader();
  576.  
  577. reader.onload = function (e) {
  578. $('#image_upload_preview').attr('src', e.target.result);
  579. }
  580.  
  581. reader.readAsDataURL(input.files[0]);
  582. }
  583. }
  584.  
  585. $("#inputFile").change(function () {
  586. readURL(this);
  587. });
  588.  
  589. </script>
  590.  
  591.  
  592.  
  593.  
  594. <div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
  595. <div class="modal-dialog">
  596. <div class="modal-content">
  597. <div class="modal-header">
  598. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  599. <h4 class="modal-title" id="myModalLabel">Upload Image</h4>
  600. </div>
  601. <div class="modal-body">
  602. <form action="<?php echo site_url('/admin/testimonial/unggah'); ?>" class="dropzone" >
  603. </form>
  604.  
  605. </div>
  606. <div class="modal-footer">
  607. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  608. <button type="button" class="btn btn-primary">Save changes</button>
  609. </div>
  610. </div>
  611. </div>
  612. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement