You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

502 lines
28KB

  1. <?php
  2. /**
  3. * Copyright La boîte à pain (2018)
  4. *
  5. * contact@opendistrib.net
  6. *
  7. * Ce logiciel est un programme informatique servant à aider les producteurs
  8. * à distribuer leur production en circuits courts.
  9. *
  10. * Ce logiciel est régi par la licence CeCILL soumise au droit français et
  11. * respectant les principes de diffusion des logiciels libres. Vous pouvez
  12. * utiliser, modifier et/ou redistribuer ce programme sous les conditions
  13. * de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
  14. * sur le site "http://www.cecill.info".
  15. *
  16. * En contrepartie de l'accessibilité au code source et des droits de copie,
  17. * de modification et de redistribution accordés par cette licence, il n'est
  18. * offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
  19. * seule une responsabilité restreinte pèse sur l'auteur du programme, le
  20. * titulaire des droits patrimoniaux et les concédants successifs.
  21. *
  22. * A cet égard l'attention de l'utilisateur est attirée sur les risques
  23. * associés au chargement, à l'utilisation, à la modification et/ou au
  24. * développement et à la reproduction du logiciel par l'utilisateur étant
  25. * donné sa spécificité de logiciel libre, qui peut le rendre complexe à
  26. * manipuler et qui le réserve donc à des développeurs et des professionnels
  27. * avertis possédant des connaissances informatiques approfondies. Les
  28. * utilisateurs sont donc invités à charger et tester l'adéquation du
  29. * logiciel à leurs besoins dans des conditions permettant d'assurer la
  30. * sécurité de leurs systèmes et ou de leurs données et, plus généralement,
  31. * à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
  32. *
  33. * Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
  34. * pris connaissance de la licence CeCILL, et que vous en avez accepté les
  35. * termes.
  36. */
  37. use common\helpers\Dropdown;
  38. use common\helpers\GlobalParam;
  39. use common\logic\Distribution\Distribution\Module\DistributionModule;
  40. use common\logic\Distribution\Distribution\Service\ExportManager;
  41. use common\logic\Feature\Feature\Feature;
  42. use common\logic\Feature\Feature\FeatureModule;
  43. use common\logic\User\User\Module\UserModule;
  44. use common\logic\User\UserGroup\Module\UserGroupModule;
  45. use yii\helpers\Html;
  46. use yii\widgets\ActiveForm;
  47. use common\logic\Producer\Producer\Model\Producer;
  48. use common\logic\Config\TaxRate\Model\TaxRate;
  49. use common\logic\Document\Document\Model\Document;
  50. use yii\helpers\ArrayHelper;
  51. \backend\assets\VuejsProducerUpdateAsset::register($this);
  52. $userModule = UserModule::getInstance();
  53. $userGroupModule = UserGroupModule::getInstance();
  54. $distributionExportManager = DistributionModule::getInstance()->getExportManager();
  55. $featureChecker = FeatureModule::getInstance()->getChecker();
  56. $userCurrent = GlobalParam::getCurrentUser();
  57. $this->setTitle('Paramètres');
  58. $this->addBreadcrumb($this->getTitle());
  59. ?>
  60. <script>
  61. var appInitValues = {
  62. isAdmin: <?= (int)$userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent) ?>
  63. };
  64. </script>
  65. <div class="user-update" id="app-producer-update">
  66. <div id="nav-params">
  67. <a v-for="section in sectionsArray" v-if="!section.isAdminSection || (section.isAdminSection && isAdmin)"
  68. :class="'btn '+((currentSection == section.name) ? 'btn-primary' : 'btn-default')"
  69. @click="changeSection(section)" :href="'#'+section.name">
  70. {{ section.nameDisplay }}
  71. </a>
  72. </div>
  73. <div class="user-form">
  74. <?php $form = ActiveForm::begin([
  75. 'enableClientValidation' => false,
  76. ]); ?>
  77. <div>
  78. <div v-show="currentSection == 'general'" class="panel panel-default">
  79. <div class="panel-body">
  80. <h4>Accès</h4>
  81. <?= $form->field($model, 'active')
  82. ->dropDownList(Dropdown::noYesChoices())
  83. ->label('En ligne')
  84. ->hint('Activez cette option pour rendre votre espace visible à vos clients.'); ?>
  85. <?= $form->field($model, 'code')->hint("Saisissez ce champs si vous souhaitez protéger l'accès à votre espace par un code, sinon laissez-le vide.<br />"
  86. . "Ce code est à communiquer à vos clients pour qu'ils puissent ajouter votre espace à leurs favoris.<br />"
  87. . "<a href=\"" . Yii::$app->urlManager->createUrl(['communicate/index']) . "\">Cliquez ici</a> pour télécharger un mode d'emploi comprenant ce code à distribuer à vos clients.") ?>
  88. <h4>Général</h4>
  89. <?= $form->field($model, 'name') ?>
  90. <?= $form->field($model, 'type') ?>
  91. <?= $form->field($model, 'description')
  92. ->textarea(['rows' => 4])
  93. ->hint('Affiché sur la page d\'accueil') ?>
  94. <?= $form->field($model, 'address')
  95. ->textarea(['rows' => 4]) ?>
  96. <?= $form->field($model, 'postcode') ?>
  97. <?= $form->field($model, 'city') ?>
  98. <h4>Apparence</h4>
  99. <?= $form->field($model, 'background_color_logo') ?>
  100. <?= $form->field($model, 'logoFile')->fileInput() ?>
  101. <?php
  102. if (strlen($model->logo)) {
  103. echo '<img src="' . Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl . '/uploads/' . $model->logo . '" width="200px" /><br />';
  104. echo '<input type="checkbox" name="delete_logo" id="delete_logo" /> <label for="delete_logo">Supprimer le logo</label><br /><br />';
  105. }
  106. ?>
  107. <?= $form->field($model, 'photoFile')->fileInput()->hint('Format idéal : 900 x 150 px') ?>
  108. <?php
  109. if (strlen($model->photo)) {
  110. echo '<img src="' . Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl . '/uploads/' . $model->photo . '" width="400px" /><br />';
  111. echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />';
  112. }
  113. ?>
  114. <?= $form->field($model, 'behavior_home_point_sale_day_list')
  115. ->dropDownList([
  116. Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_WEEK => 'Jours de la semaine',
  117. Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS => 'Distributions à venir',
  118. ]); ?>
  119. <?= $form->field($model, 'option_point_sale_wording') ?>
  120. <h4>Groupes utilisateurs</h4>
  121. <?= $form->field($model, 'id_user_group_default')
  122. ->dropDownList($userGroupModule->getRepository()->populateUserGroupDropdownList()); ?>
  123. </div>
  124. </div>
  125. <div v-show="currentSection == 'tableau-bord'" class="panel panel-default">
  126. <div class="panel-body">
  127. <h4>Tableau de bord administration</h4>
  128. <?= $form->field($model, 'option_dashboard_number_distributions')
  129. ->dropDownList(Dropdown::numberChoices(3, 30, false, '', 3)); ?>
  130. <?= $form->field($model, 'option_dashboard_date_start')->textInput([
  131. 'class' => 'datepicker form-control'
  132. ]); ?>
  133. <?= $form->field($model, 'option_dashboard_date_end')->textInput([
  134. 'class' => 'datepicker form-control'
  135. ]); ?>
  136. </div>
  137. </div>
  138. <div v-show="currentSection == 'prise-commande'" class="panel panel-default">
  139. <div class="panel-body">
  140. <h4>Horaires</h4>
  141. <?php
  142. $delaysArray = [
  143. 1 => '1 jour',
  144. 2 => '2 jours',
  145. 3 => '3 jours',
  146. 4 => '4 jours',
  147. 5 => '5 jours',
  148. 6 => '6 jours',
  149. 7 => '7 jours',
  150. ];
  151. $deadlinesArray = [
  152. 24 => 'Minuit',
  153. 23 => '23h',
  154. 22 => '22h',
  155. 21 => '21h',
  156. 20 => '20h',
  157. 19 => '19h',
  158. 18 => '18h',
  159. 17 => '17h',
  160. 16 => '16h',
  161. 15 => '15h',
  162. 14 => '14h',
  163. 13 => '13h',
  164. 12 => '12h',
  165. 11 => '11h',
  166. 10 => '10h',
  167. 9 => '9h',
  168. 8 => '8h',
  169. ];
  170. $daysArray = [
  171. 'monday' => 'Lundi',
  172. 'tuesday' => 'Mardi',
  173. 'wednesday' => 'Mercredi',
  174. 'thursday' => 'Jeudi',
  175. 'friday' => 'Vendredi',
  176. 'saturday' => 'Samedi',
  177. 'sunday' => 'Dimanche'
  178. ];
  179. ?>
  180. <div class="row">
  181. <div class="col-md-2">
  182. <strong>Par défaut</strong>
  183. </div>
  184. <div class="col-md-5">
  185. <?= $form->field($model, 'order_delay')
  186. ->dropDownList($delaysArray, ['prompt' => '--'])
  187. ->hint('Si <strong>1 jour</strong> est sélectionné, le client pourra commander jusqu\'à la veille de la production.<br />'
  188. . 'Si <strong>2 jours</strong> est sélectionné, le client pourra commander jusqu\'à l\'avant-veille de la production, etc.'); ?>
  189. </div>
  190. <div class="col-md-5">
  191. <?= $form->field($model, 'order_deadline')
  192. ->dropDownList($deadlinesArray, ['prompt' => '--'])
  193. ->hint('Heure limite jusqu\'à laquelle les clients peuvent commander pour satisfaire le délai de commande.<br />'
  194. . 'Par exemple, si <strong>2 jours</strong> est sélectionné dans le délai de commande, le client devra commander l\'avant-veille de la production avant l\'heure précisée ici.'); ?>
  195. </div>
  196. </div>
  197. <?php foreach ($daysArray as $day => $labelDay): ?>
  198. <div class="row">
  199. <div class="col-md-2">
  200. <strong><?= $labelDay ?></strong>
  201. </div>
  202. <div class="col-md-5">
  203. <?= $form->field($model, 'order_delay_' . $day, [
  204. 'template' => '{input}',
  205. ])->dropDownList($delaysArray, ['prompt' => '--'])->label(''); ?>
  206. </div>
  207. <div class="col-md-5">
  208. <?= $form->field($model, 'order_deadline_' . $day, [
  209. 'template' => '{input}',
  210. ])->dropDownList($deadlinesArray, ['prompt' => '--'])->label(''); ?>
  211. </div>
  212. </div>
  213. <?php endforeach; ?>
  214. <h4>Informations</h4>
  215. <?= $form->field($model, 'order_infos')
  216. ->textarea(['rows' => 6])
  217. ->hint('Affichées au client lors de sa commande') ?>
  218. <?= $form->field($model, 'option_payment_info')
  219. ->textarea(['rows' => 6])
  220. ->hint('Affichées au client à la fin de la prise de commande') ?>
  221. <h4>Tunnel de commande</h4>
  222. <?= $form->field($model, 'option_order_entry_point')
  223. ->dropDownList([
  224. Producer::ORDER_ENTRY_POINT_DATE => 'Date',
  225. Producer::ORDER_ENTRY_POINT_POINT_SALE => 'Point de vente',
  226. ], []); ?>
  227. <?= $form->field($model, 'behavior_order_select_distribution')
  228. ->dropDownList([
  229. Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_CALENDAR => 'Calendrier',
  230. Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST => 'Liste',
  231. ]); ?>
  232. <?= $form->field($model, 'option_delivery')
  233. ->dropDownList(Dropdown::noYesChoices()); ?>
  234. <?php echo $form->field($model, 'option_allow_order_guest')
  235. ->dropDownList(Dropdown::noYesChoices()); ?>
  236. <h4>Notifications</h4>
  237. <?= $form->field($model, 'option_notify_producer_order_summary')
  238. ->dropDownList(Dropdown::noYesChoices()); ?>
  239. <?= $form->field($model, 'option_email_confirm')
  240. ->dropDownList(Dropdown::noYesChoices()); ?>
  241. <?= $form->field($model, 'option_email_confirm_producer')
  242. ->dropDownList(Dropdown::noYesChoices()); ?>
  243. <h4>Divers</h4>
  244. <?php
  245. $choicesWeeksDistributionsActivatedInAdvanceArray = [null => '--'];
  246. for ($i = 1; $i < 13; $i++) {
  247. $choicesWeeksDistributionsActivatedInAdvanceArray[$i] = $i . ' semaine' . (($i > 1) ? 's' : '');
  248. }
  249. ?>
  250. <?= $form->field($model, 'option_weeks_distributions_activated_in_advance')
  251. ->dropDownList($choicesWeeksDistributionsActivatedInAdvanceArray)
  252. ->hint("Attention, les premières semaines doivent être activées manuellement."); ?>
  253. <?= $form->field($model, 'option_order_reference_type')
  254. ->dropDownList([
  255. Producer::ORDER_REFERENCE_TYPE_NONE => '--',
  256. Producer::ORDER_REFERENCE_TYPE_YEARLY => 'Annuelle',
  257. ], []); ?>
  258. <?= $form->field($model, 'option_behavior_cancel_order')
  259. ->dropDownList([
  260. Producer::BEHAVIOR_DELETE_ORDER_DELETE => 'Suppression de la commande',
  261. Producer::BEHAVIOR_DELETE_ORDER_STATUS => 'Passage de la commande en statut "supprimé"',
  262. ], []); ?>
  263. </div>
  264. </div>
  265. <div v-show="currentSection == 'exports'" class="panel panel-default">
  266. <div class="panel-body">
  267. <h4>Exports affichés dans les distributions</h4>
  268. <?= $distributionExportManager->getProducerFormCheckboxes($form, $model) ?>
  269. <h4>Options exports</h4>
  270. <?= $form->field($model, 'option_csv_separator')
  271. ->dropDownList([
  272. ';' => 'Point-virgule (;)',
  273. ',' => 'Virgule (,)'
  274. ], []); ?>
  275. <?= $form->field($model, 'option_export_display_product_reference')
  276. ->dropDownList(Dropdown::noYesChoices()); ?>
  277. <?= $form->field($model, 'option_export_display_column_delivery_note')
  278. ->dropDownList(Dropdown::noYesChoices()); ?>
  279. <?= $form->field($model, 'option_csv_export_all_products')
  280. ->dropDownList(Dropdown::noYesChoices()); ?>
  281. <?= $form->field($model, 'option_csv_export_by_piece')
  282. ->dropDownList(Dropdown::noYesChoices()); ?>
  283. <?php if($featureChecker->isEnabled(Feature::ALIAS_EXPORT_SHOPPING_CART_LABELS_ADVANCED)): ?>
  284. <?= $form->field($model, 'export_shopping_cart_labels_format')
  285. ->dropDownList($distributionExportManager->getGenerator(ExportManager::SHOPPING_CART_LABELS_PDF)->populateDropdownSpecificFormats()); ?>
  286. <?php else: ?>
  287. <?= $form->field($model, 'export_shopping_cart_labels_number_per_column')
  288. ->dropDownList(Dropdown::numberChoices(1, 20)); ?>
  289. <?php endif; ?>
  290. </div>
  291. </div>
  292. <div v-show="currentSection == 'abonnements'" class="panel panel-default">
  293. <div class="panel-body">
  294. <h4>Abonnements</h4>
  295. <?= $form->field($model, 'user_manage_subscription')
  296. ->dropDownList(Dropdown::noYesChoices()); ?>
  297. </div>
  298. </div>
  299. <div v-show="currentSection == 'credit-payment'" class="panel panel-default">
  300. <div class="panel-body">
  301. <h4>Crédit</h4>
  302. <?= $form->field($model, 'credit')
  303. ->dropDownList(Dropdown::noYesChoices())
  304. ->label('Activer le système de Crédit')
  305. ->hint('Le système de Crédit permet à vos clients d\'avoir un compte prépayé sur le site <em>distrib</em>.<br />'
  306. . 'Ils créditent leur compte en vous donnant la somme de leur choix et c\'est ensuite à vous de ' . Html::a('mettre à jour', ['user/index']) . ' leur Crédit en ligne.<br />'
  307. . 'Ceci fait, les clients paient leur commande directement via leur Crédit.'); ?>
  308. <?= $form->field($model, 'credit_functioning')
  309. ->dropDownList([
  310. Producer::CREDIT_FUNCTIONING_OPTIONAL => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_OPTIONAL],
  311. Producer::CREDIT_FUNCTIONING_MANDATORY => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_MANDATORY],
  312. Producer::CREDIT_FUNCTIONING_USER => Producer::$creditFunctioningArray[Producer::CREDIT_FUNCTIONING_USER],
  313. ], [])->hint(Producer::HINT_CREDIT_FUNCTIONING); ?>
  314. <?= $form->field($model, 'use_credit_checked_default')
  315. ->dropDownList(Dropdown::noYesChoices())
  316. ->hint('Utilisation optionnelle du Crédit.'); ?>
  317. <?= $form->field($model, 'credit_limit_reminder', [
  318. 'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
  319. ])
  320. ->hint("Une relance est envoyé au client dès que ce seuil est dépassé."); ?>
  321. <?= $form->field($model, 'credit_limit', [
  322. 'template' => '{label}<div class="input-group">{input}<span class="input-group-addon"><span class="glyphicon glyphicon-euro"></span></span></div>{hint}',
  323. ])->hint('Limite de crédit que l\'utilisateur ne pourra pas dépasser. Laisser vide pour permettre un crédit négatif et infini.'); ?>
  324. <?= $form->field($model, 'option_check_by_default_prevent_user_credit')
  325. ->dropDownList(Dropdown::noYesChoices()); ?>
  326. <?php if($featureChecker->isEnabled(Feature::ALIAS_ONLINE_PAYMENT)): ?>
  327. <h4>Paiement en ligne</h4>
  328. <?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?>
  329. <?= $form->field($model, 'online_payment')
  330. ->dropDownList(Dropdown::noYesChoices()); ?>
  331. <?= $form->field($model, 'option_stripe_mode_test')->dropDownList(Dropdown::noYesChoices()); ?>
  332. <?= $form->field($model, 'option_online_payment_type')
  333. ->dropDownList([
  334. 'credit' => 'Alimentation du crédit',
  335. 'order' => 'Paiement à la commande',
  336. ], []); ?>
  337. <?= $form->field($model, 'option_stripe_public_key')->textInput(); ?>
  338. <?= $form->field($model, 'option_stripe_private_key')->textInput(); ?>
  339. <?= $form->field($model, 'option_stripe_endpoint_secret')->textInput(); ?>
  340. <?php endif; ?>
  341. <?= $form->field($model, 'option_online_payment_minimum_amount')
  342. ->hint('Valeur par défaut si non défini : ' . Producer::ONLINE_PAYMENT_MINIMUM_AMOUNT_DEFAULT . ' €')
  343. ->textInput(); ?>
  344. <?php endif; ?>
  345. </div>
  346. </div>
  347. <div v-show="currentSection == 'infos'" class="panel panel-default">
  348. <div class="panel-body">
  349. <h4>Informations légales</h4>
  350. <?= $form->field($model, 'mentions')
  351. ->textarea(['rows' => 15])
  352. ->hint('') ?>
  353. <?= $form->field($model, 'gcs')
  354. ->textarea(['rows' => 15])
  355. ->hint('') ?>
  356. </div>
  357. </div>
  358. <div v-show="currentSection == 'logiciels-caisse'" class="panel panel-default">
  359. <div class="panel-body">
  360. <h4>Tiller</h4>
  361. <?= $form->field($model, 'tiller')
  362. ->dropDownList(Dropdown::noYesChoices())
  363. ->label('Synchroniser avec Tiller'); ?>
  364. <?= $form->field($model, 'tiller_provider_token'); ?>
  365. <?= $form->field($model, 'tiller_restaurant_token'); ?>
  366. </div>
  367. </div>
  368. <div v-show="currentSection == 'facturation'" class="panel panel-default">
  369. <div class="panel-body">
  370. <h4>Facturation</h4>
  371. <?= $form->field($model, 'id_tax_rate_default')
  372. ->dropDownList(ArrayHelper::map(TaxRate::find()->all(), 'id', function ($model) {
  373. return $model->name;
  374. }))
  375. ->label('TVA à appliquer par défaut'); ?>
  376. <?= $form->field($model, 'option_tax_calculation_method')
  377. ->dropDownList(Document::$taxCalculationMethodArray); ?>
  378. <?= $form->field($model, 'option_export_evoliz')->dropDownList(Dropdown::noYesChoices()); ?>
  379. <?php $hintKeywordsPrefix = "Saisissez [ANNEE] pour intégrer l'année courante"; ?>
  380. <?= $form->field($model, 'document_quotation_prefix')->hint($hintKeywordsPrefix); ?>
  381. <?= $form->field($model, 'document_quotation_first_reference'); ?>
  382. <?= $form->field($model, 'document_quotation_duration'); ?>
  383. <?= $form->field($model, 'document_invoice_prefix')->hint($hintKeywordsPrefix);; ?>
  384. <?= $form->field($model, 'document_invoice_first_reference'); ?>
  385. <?= $form->field($model, 'document_delivery_note_prefix')->hint($hintKeywordsPrefix);; ?>
  386. <?= $form->field($model, 'document_delivery_note_first_reference'); ?>
  387. <?= $form->field($model, 'delivery_note_automatic_validation')->dropDownList(Dropdown::noYesChoices()); ?>
  388. <?= $form->field($model, 'option_invoice_only_based_on_delivery_notes')->dropDownList(Dropdown::noYesChoices()); ?>
  389. <?= $form->field($model, 'option_document_width_logo')
  390. ->dropDownList(Dropdown::numberChoices(50, 250, true, 'px', 50)); ?>
  391. <?= $form->field($model, 'document_display_orders_invoice')->dropDownList(Dropdown::noYesChoices()); ?>
  392. <?= $form->field($model, 'document_display_orders_delivery_note')->dropDownList(Dropdown::noYesChoices()); ?>
  393. <?= $form->field($model, 'document_display_prices_delivery_note')->dropDownList(Dropdown::noYesChoices()); ?>
  394. <?= $form->field($model, 'document_display_product_description')->dropDownList(Dropdown::noYesChoices()); ?>
  395. <?= $form->field($model, 'option_document_price_decimals')->dropDownList([
  396. 2 => '2',
  397. 3 => '3'
  398. ]); ?>
  399. <?= $form->field($model, 'option_document_display_price_unit_reference')
  400. ->dropDownList(Dropdown::noYesChoices()); ?>
  401. <?= $form->field($model, 'document_infos_top')
  402. ->textarea(['rows' => 8])
  403. ->hint("Affichées juste en dessous de l'adresse"); ?>
  404. <?= $form->field($model, 'document_infos_bottom')
  405. ->textarea(['rows' => 8]) ?>
  406. <?= $form->field($model, 'document_image_bottomFile')->fileInput()->hint('') ?>
  407. <?php
  408. if (strlen($model->document_image_bottom)) {
  409. echo '<img src="' . Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl . '/uploads/' . $model->document_image_bottom . '" width="400px" /><br />';
  410. echo '<input type="checkbox" name="delete_document_image_bottom" id="delete_document_image_bottom" /> <label for="delete_document_image_bottom">Supprimer l\'image</label><br /><br />';
  411. }
  412. ?>
  413. <?= $form->field($model, 'document_infos_quotation')
  414. ->textarea(['rows' => 8]) ?>
  415. <?= $form->field($model, 'document_infos_invoice')
  416. ->textarea(['rows' => 8]) ?>
  417. <?= $form->field($model, 'document_infos_delivery_note')
  418. ->textarea(['rows' => 8]) ?>
  419. </div>
  420. </div>
  421. <div v-show="currentSection == 'software'" class="panel panel-default">
  422. <div class="panel-body">
  423. <h4>Opendistrib</h4>
  424. <?php $urlAboutPage = Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/about']); ?>
  425. <?= $form->field($model, 'option_testimony')
  426. ->textarea(['rows' => 7])
  427. ->hint("Écrivez ici votre témoignage concernant l'utilisation du logiciel. Il sera publié sur la page <a href=\"" . $urlAboutPage . "\" target=\"_blanck\">À propos</a> du site."); ?>
  428. <?= $form->field($model, 'option_time_saved')
  429. ->dropDownList([
  430. null => '--',
  431. 0.5 => '30 minutes',
  432. 1 => '1 heure',
  433. 2 => '2 heures',
  434. 3 => '3 heures',
  435. 4 => '4 heures',
  436. 5 => '5 heures',
  437. 6 => '6 heures',
  438. 7 => '7 heures',
  439. 8 => '8 heures',
  440. ])
  441. ->hint("Sélectionnez le temps que vous estimez gagner chaque semaine en utilisant ce logiciel. Cette donnée sera utilisée sur la page <a href=\"" . $urlAboutPage . "\" target=\"_blanck\">À propos</a> du site."); ?>
  442. <?= $form->field($model, 'option_display_message_new_opendistrib_version')
  443. ->dropDownList(Dropdown::noYesChoices()); ?>
  444. </div>
  445. </div>
  446. <div class="form-group">
  447. <?= Html::submitButton('Mettre à jour', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  448. </div>
  449. </div>
  450. <?php ActiveForm::end(); ?>
  451. </div>
  452. </div>