public function getTemplateRecord()
 {
     $template = \Binaryk\Models\Nomenclator\Template::find(\Input::get('id_template'));
     $template->tip_procedura_ = $template->tipprocedura ? $template->tipprocedura->nume : '-';
     $template->tip_anunt_ = $template->tipanunt ? $template->tipanunt->nume : '-';
     $template->tip_achizitie_ = json_decode($template->tip_achizitie);
     if ($template->tip_anunt) {
         $template->modalitati_publicare = \Binaryk\Models\Nomenclator\ModalitatiPublicare::where('id_tip_anunt', $template->tip_anunt)->get();
         foreach ($template->modalitati_publicare as $i => $record) {
             $record->is_anunt_anterior_ = \Binaryk\Models\Nomenclator\ModalitatiPublicare::toTextAnterior($record->anunt_anterior);
             $record->complexitate_ = \Binaryk\Models\Nomenclator\ModalitatiPublicare::toTextTipComplexitate($record->tip_complexitate);
             $record->zile_depunere_publicare_ = \Binaryk\Models\Nomenclator\ModalitatiPublicare::toTextZileDP($record->zile_dp);
         }
     } else {
         $template->modalitati_publicare = NULL;
     }
     return \Response::json(['record' => $template]);
 }
예제 #2
0
 protected function addControls()
 {
     $this->addControl(\Easy\Form\Textbox::make('achizitii::~layouts.form.controls.textboxes.textbox')->name('denumire')->caption('Denumirea modalității de publicare')->placeholder('Denumirea modalității de publicare')->class('form-control  data-source')->controlsource('nume')->controltype('textbox')->maxlength(255))->addControl(\Easy\Form\Combobox::make('achizitii::~layouts.form.controls.comboboxes.combobox')->name('anunt_anterior')->caption('Anunt intenție publicat anterior')->class('form-control data-source input-group form-select init-on-update-delete')->controlsource('anunt_anterior')->controltype('combobox')->enabled('false')->options(\Binaryk\Models\Nomenclator\ModalitatiPublicare::anterior()))->addControl(\Easy\Form\Combobox::make('achizitii::~layouts.form.controls.comboboxes.combobox')->name('tip_complexitate')->caption('Tip complexitate')->class('form-control data-source input-group form-select init-on-update-delete')->controlsource('tip_complexitate')->controltype('combobox')->enabled('false')->options(\Binaryk\Models\Nomenclator\ModalitatiPublicare::complexitate()))->addControl(\Easy\Form\Combobox::make('achizitii::~layouts.form.controls.comboboxes.combobox')->name('zile_dp')->caption('Zile D-P')->class('form-control data-source input-group form-select init-on-update-delete')->controlsource('zile_dp')->controltype('combobox')->enabled('false')->options(\Binaryk\Models\Nomenclator\ModalitatiPublicare::zile()));
 }
 public function getModalFormModalitatiPublicareByTipAnunt()
 {
     return \Response::json(['success' => true, 'modal' => \Binaryk\Models\Nomenclator\ModalitatiPublicare::toFormByTipAnunt(\Input::get('id_tip_anunt'))]);
 }