Ejemplo n.º 1
0
     /* ------------------------------------------------------------ */
 /* ------------------------------------------------------------ */
 /* Blank card */
 /* ------------------------------------------------------------ */
 case 'bc':
     if ($g_user->check_action(FICADD) == 1) {
         $r = HtmlInput::title_box(_("Nouvelle fiche"), $ctl);
         /* get cat. name */
         $cat_name = $cn->get_value('select fd_label from fiche_def where fd_id=$1', array($fd_id));
         $f = new Fiche($cn);
         $r .= '<form id="save_card" method="POST" onsubmit="this.ipopup=\'' . $ctl . '\';save_card(this);return false;" >';
         $r .= dossier::hidden();
         $r .= isset($ref) ? HtmlInput::hidden('ref', 1) : '';
         $r .= HtmlInput::hidden('fd_id', $fd_id);
         $r .= HtmlInput::hidden('ctl', $ctl);
         $r .= $f->blank($fd_id);
         $r .= '<p style="text-align:center">';
         $r .= HtmlInput::submit('sc', _('Sauve'));
         $r .= '</p>';
         $r .= '</form>';
         $html = $r;
     } else {
         $html = alert(_('Action interdite'), true);
     }
     break;
     /* ------------------------------------------------------------ */
     /* Show Type */
     /* Before inserting a new card, the type must be selected */
     /* ------------------------------------------------------------ */
 /* ------------------------------------------------------------ */
 /* Show Type */